摘要:
DECLARE @TableName varchar(100) --定义存储表名称DECLARE staff_cursor CURSOR FOR --定义游标进行操作 SELECT [name] FROM sys.sysobjects WHERE type='U' -- 打开游标 OPEN staff_cursor -- 提取记录数据 FETCH Next FROM staff_cursor Into @TableName WHILE @@fetch_status = 0 BEGIN EXEC('DROP TABLE... 阅读全文