2013年8月20日

if exists用法

摘要: 1 判断数据库是否存在Sql代码 if exists (select * from sys.databases where name = ’数据库名’) drop database [数据库名] if exists (select * from sys.databases where name = ’数据库名’) drop database [数据库名]2 判断表是否存在Sql代码 if exists (select * from sysobjects where id = object_id(N’[表名]’) and OBJECTPROPERTY(id, N’IsUserTable’) =. 阅读全文

posted @ 2013-08-20 10:26 MisterS 阅读(47856) 评论(0) 推荐(2) 编辑

导航