Using the CMD command-line window to manipulate SQL Server

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.