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
查询出某种规律的表,并删除

 

posted on 2016-11-08 13:12  学业未成  阅读(1798)  评论(0编辑  收藏  举报