摘要:
用游标删除,写个列子,aaaa为定义的游标,在要删除的数据库中执行就会清空所有表declare aaaa cursorfor select * from sysobjects where type = 'u'declare @tbname varchar (100)open aaaaFETCH NEXT FROM AAAA INTO @TBNAME WHILE (FETCH_STATUS <> -1)BEGIN EXEC([email=]'DELETE'+@TBNAME[/email]) FETCH NEXT FROM AAAA INTO @name 阅读全文