--判断数据库是否存在
if exists(select 1 from sys.databases where name='dbName')
--存在
--判断数据表是否存在
if exists(select * from sys.objects where name ='tbName' )
--存在
--判断数据库是否存在
if exists(select 1 from sys.databases where name='dbName')
--存在
--判断数据表是否存在
if exists(select * from sys.objects where name ='tbName' )
--存在