发布时间:2010-09-02 11:24 来源:未知
下面为您介绍能够一次性删除数据库所有存储过程的SQL语句,供您参考,假如您对相关的SQL语句感兴趣,不妨一看,希望能够对您有所启迪。
--/第1步**********删除所有表的外键约束*************************/
代码
DECLARE c1 cursor for
from sysobjects
open c1
while(@@fetch_status=0)
end
Code highlighting produced by Actipro CodeHighlighter (freeware)
-->use 数据库
select @tname=@tname + Name + ',' from sysobjects where xtype='U'
Code highlighting produced by Actipro CodeHighlighter (freeware)
-->use 数据库
select @tname=@tname + Name + ',' from sysobjects where xtype='P'
select @tname='drop Procedure ' + left(@tname,len(@tname)-1)
exec(@tname)