declare @varname nvarchar(128) while exists (select name from sys.tables where name like 'se_%') begin select top 1 @varname = name from sys.tables where name like N'se_%' exec (N'drop table '+@varname) end
查询出某种规律的表,并删除
declare @varname nvarchar(128) while exists (select name from sys.tables where name like 'se_%') begin select top 1 @varname = name from sys.tables where name like N'se_%' exec (N'drop table '+@varname) end
查询出某种规律的表,并删除
转载于:https://www.cnblogs.com/GYoungBean/p/6042649.html