常用存儲(chǔ)過(guò)程
常用系統(tǒng)存儲(chǔ)過(guò)程有:?exec?sp_databases;?--查看數(shù)據(jù)庫(kù)exec?sp_tables;????????--查看表exec?sp_columns
student;--查看列exec?sp_helpIndex
student;--查看索引exec?sp_helpConstraint
student;--約束exec?sp_stored_procedures;exec?sp_helptext?'sp_stored_procedures';--查看存儲(chǔ)過(guò)程創(chuàng)建、定義語(yǔ)句exec?sp_rename
student, stuInfo;--修改表、索引、列的名稱exec?sp_renamedb
myTempDB, myDB;--更改數(shù)據(jù)庫(kù)名稱exec?sp_defaultdb?'master',?'myDB';--更改登錄名的默認(rèn)數(shù)據(jù)庫(kù)exec?sp_helpdb;--數(shù)據(jù)庫(kù)幫助,查詢數(shù)據(jù)庫(kù)信息exec?sp_helpdb
master;





