比如说表名=yes 的就删除掉
模糊查询表名:表名 like '%_single' 的就删除掉
怎么实现哦?
------解决方案--------------------
- SQL code
use masterdeclare @str varchar(max)set @str=''select @[email protected]+' drop table '+quotename(name,'')+';'from sysobjects where xtype='U' and category=0 and CHARINDEX('_single',name)>0print @strexec(@str)--此语句删除系统中所有表明中存在‘_single’的用户表
------解决方案--------------------