- 浏览: 6267 次
- 性别:
最新评论
文章列表
Sql Server中判断表或者数据库是否存在
if exists(select 1 from master..dbo.sysdatabases where name='example')
print 'DataBase existed'
else
print 'Database not existed'
2.表
IF Exists(Select 1 From sysObjects Where Name ='表名' And Type In ('S','U'))
Print 'Exists Table'
Else
Print 'Not Exists Table'
...