首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

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

2012-11-16 
在新建数据库的时候判断要建的数据库是否存在. if(exists( select * from sys.databases where name数据

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

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

 begin
   print '存在'
 end 
 else
 begin
   print '不存在'
 end

热点排行