Recently I work with SQLCMD utility and it is quite interesting. You can enable it in your Management studio as follows;
Then you can make use color coding and syntax highlighting as well . Other than this ,you can enable this SQLCMD mode in your normal command line by setting path variable to binn folder as following example
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\
Then just open command line and then type this command.It will show the option available;
-sqlcmd –?
To connect to a database and query for data
sqlcmd -S ERANGA-PC\SQLEXPRESS -d T1 -U sa -P Qwer1234 –q “Select * from Student”
Comments