dos命令下使用sql server,dos命令sqlserver

來源:互聯網
上載者:User

dos命令下使用sql server,dos命令sqlserver
通常情況下,我們可以在dos命令下使用sql server,使用dos命令來使用sql server的方法如下:
1.串連上資料庫伺服器:
使用osql命令,該命令可以在dos視窗中輸入osql ?查看,如:

接下來我們使用osql  -S localhost -U sa -P 123456串連上我們的資料庫伺服器。

2.而後使用sql語句查詢資料庫中所有資料庫名: 

3.我們可以使用sql語句擷取某個資料庫下的所有的表的名稱


其他的操作不再多述。

相關文章

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.