标签:style blog color os ar for sp 数据 div
DECLARE @SPID VARCHAR(20) DECLARE #TB CURSOR FAST_FORWARD FOR SELECT SPID=CAST(SPID AS VARCHAR(20)) FROM MASTER..SYSPROCESSES WHERE DBID=DB_ID(N‘Test‘) OPEN #TB FETCH NEXT FROM #TB INTO @SPID WHILE @@FETCH_STATUS=0 BEGIN EXEC(‘KILL ‘+@SPID) FETCH NEXT FROM #TB INTO @SPID END CLOSE #TB DEALLOCATE #TB IF EXISTS(SELECT 1 FROM sys.databases WHERE name=N‘Test‘) DROP DATABASE MIES
标签:style blog color os ar for sp 数据 div
原文地址:http://www.cnblogs.com/gdutzhulm/p/4048690.html