摘要: 用游标删除,写个列子,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 阅读全文
posted @ 2011-05-09 09:42 小锋神 阅读(1381) 评论(0) 推荐(0) 编辑