摘要: SQLServer判断 数据库 函数 存储过程 表 视图等 是否存在1、判断数据库是否存在if exists(select * from master..sysdatabases where name=N'数据库名')print 'The database exists' --若存在则输出--drop database '数据库名' --用于最初创建数据库else print 'not exists'2、判断要创建的函数名是否存在if exists (select * from dbo.sysobjects where id = 阅读全文
posted @ 2013-05-17 09:45 Shang0109 阅读(808) 评论(0) 推荐(0) 编辑