常用存儲(chǔ)過程
常用系統(tǒng)存儲(chǔ)過程有:?exec?sp_databases;?--查看數(shù)據(jù)庫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ǔ)過程創(chuàng)建、定義語句exec?sp_rename
student, stuInfo;--修改表、索引、列的名稱exec?sp_renamedb
myTempDB, myDB;--更改數(shù)據(jù)庫名稱exec?sp_defaultdb?'master',?'myDB';--更改登錄名的默認(rèn)數(shù)據(jù)庫exec?sp_helpdb;--數(shù)據(jù)庫幫助,查詢數(shù)據(jù)庫信息exec?sp_helpdb
master;





