This article mainly describes using the CMD command-line window under Windows to manipulate SQL Server.
First we can run osql?/, which will show all commands that can be manipulated by the cmd command line to SQL Server
(There is a picture of the truth)
Then we know that the Connect server is-s, the login ID is-u, the password is-p
Let's try it now.
Run Osql-s "Database Server"-u "Login user name"-P "Login Password"
A 1> indicates a successful connection, and you can enter an SQL statement to manipulate it.
With the cmd command line to operate Sqlserver,dotnetgeek feel not much use, and, select out of the data layout display is not neat and beautiful,
You can use this method if you happen to want to operate the company's SQL Server in a computer that does not have SQL Server.
Using the CMD command-line window to manipulate SQL Server