Run SQL Queries From Command Prompt
In this article I tell you about how to run sql queries from command prompt.
In this article I tell you about how to run sql queries from command prompt. We can use sqlcmd command to run SQL queries.
Go to Start->Run-->Type "cmd"-> OK
Type "sqlcmd" command. If you want to run sql query in SQL Server authentication mode, then write username and password also with sqlcmd. And Press Enter.
Type following commands and type GO for the batch termination as shown in below screen:
You can retrieve this table from Query Editor also.