天狼鼠

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年5月15日

摘要: 1 判断数据库是否存在if exists (select * from sys.databases where name = '数据库名') drop database [数据库名] 2 判断表是否存在if exists (select * from sysobjects where id = object_id(N'[表名]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [表名] 3 判断存储过程是否存在if exists (select * from sysobjects w 阅读全文
posted @ 2012-05-15 12:04 情有独钟 阅读(2346) 评论(0) 推荐(0) 编辑