日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
刪除數(shù)據(jù)庫所有存儲過程的SQL語句

下面為您介紹能夠一次性刪除數(shù)據(jù)庫所有存儲過程的SQL語句,供您參考,如果您對相關的SQL語句感興趣,不妨一看,希望能夠?qū)δ兴鶈⒌稀?/p>

--/第1步**********刪除所有表的外鍵約束*************************/

[[15062]][[15063]]代碼

   
    
    DECLARE
     c1 
    cursor
     
    for
     
select ' alter table [ ' + object_name (parent_obj) + ' ] drop constraint [ ' + name + ' ]; '
from sysobjects
where xtype = ' F '
open c1
declare @c1 varchar ( 8000 )
fetch next from c1 into @c1
while ( @@fetch_status = 0 )
begin
exec ( @c1 )
fetch next from c1 into @c1
end
close c1
deallocate c1

--/第2步**********刪除所有表*************************/

  
   
   use
    數(shù)據(jù)庫
declare @tname varchar ( 8000 )
set @tname = ''
select @tname = @tname + Name + ' , ' from sysobjects where xtype = ' U '
select @tname = ' drop table ' + left ( @tname , len ( @tname ) - 1 )
exec ( @tname )

--/第2步**********刪除所有存儲過程*************************/

  
   
   use
    數(shù)據(jù)庫
declare @tname varchar ( 8000 )
set @tname = ''
select @tname = @tname + Name + ' , ' from sysobjects where xtype = ' P '
select @tname = ' drop Procedure ' + left ( @tname , len ( @tname ) - 1 )
exec ( @tname )

當前題目:刪除數(shù)據(jù)庫所有存儲過程的SQL語句
文章分享:http://www.5511xx.com/article/codsijp.html