SQL server的預存程序

來源:互聯網
上載者:User

標籤:

 1.sp_databases 列出伺服器上的所有資料庫資訊,包括資料庫名稱大小。

  例:exec sp_databases

 2.sp_helpdb 報告有關指定資料庫或所有資料庫的資訊。

例:

exec sp_helpdb

 

 3.sp_renamedb 更改資料庫名稱

例:exec sp_renamedb ‘myschool‘,‘wode‘

 4.sp_tables 返回當前環境下可查詢的表或視圖的資訊。

例:exec sp_tables

 

 

5.sp_columns 返回某個表或視圖的列的資訊,包括資料類型和長度。

例:exec sp_columns Grade

 

 

6.sp_help 查看某個資料庫物件資訊。

例:exec sp_help

 

 

7.sp_helpconstraint 查看某個表的約束。

例:exec sp_helpconstraint Grade

 

8.sp_helpindex 查看某個表的索引。

例:exec sp_helpindex Grade

 

9.sp_stored_procedures 顯示預存程序的表。

10.sp_password 添加或修改登入賬戶的密碼。

SQL server的預存程序

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.