数据库 批量删除表

select 'drop table '+name+';' from sys.tables where name like 'B111%' 

 

select 'BKM'+SystemNo from b.[dbo].[b] where 'BKM'+SystemNo not in (select name from sys.tables where name like 'BKM%')

posted @ 2019-06-12 09:46  bug123456  阅读(190)  评论(0编辑  收藏  举报