输入banner图图片脚本导航/分类

在新建数据库的时候判断要建的数据库是否存在

在新建数据库的时候判断要建的数据库是否存在 if(exists( select * from sys.databases where name=数据库名)) begin www.2cto.com print 存在 end else begin print 不存在 end


在新建数据库的时候判断要建的数据库是否存在

if(exists( select * from sys.databases where name='数据库名'))

begin www.2cto.com

print '存在'

end

else

begin

print '不存在'

end