How to manipulate SQL Server using the CMD command line window _mssql

Source: Internet
Author: User

The osql tool is a Microsoft Windows 32 command Prompt tool that you can use to run Transact-SQL statements and script files. The osql tool communicates with the server using the ODBC database application programming Interface (API).

This article mainly introduces using the CMD Command Line window under Windows to operate SQL Server, first we can run osql?/, so that all the commands that can operate SQL Server through the cmd command line are displayed. osql Download Address http://www.jb51.net/database/57662.html

(There is a picture of the truth)

Then we know that the Connect server is-s, login ID is-u, password is-p

Let's try the operation now.

Run Osql-s "Database Server"-U "login username"-P "Login Password"

A 1> indicates a successful connection, at which point you can enter the SQL statement to operate.

CMD command line to operate Sqlserver,dotnetgeek feel not much useful, and, select out of the data typesetting display is not neat and beautiful,

You can use this method if you are on a computer that does not have SQL Server and you just want to manipulate the company's SQL Server.

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: info-contact@alibabacloud.com 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.