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.
Step 1
Go to Start->Run-->Type "cmd"-> OK

Step 2
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.

Step 3
Type following commands and type GO for the batch termination as shown in below screen:

Step 4
You can retrieve this table from Query Editor also.
