SQLServer2005 判断数据库中是否存在某张表或是查找库中的全部表名,而后删除

根据表名的个数判断:
select count(name) as co from sysobjects where name = 'TD_RXNFDM'table

查找苦中全部表的表名:
SELECT [name] FROM sysobjects WHERE type='u'object

删除某表: 
   if exists (select name from sysobjects where name = '表名')
   drop table 表名select

相关文章
相关标签/搜索