数据库对象检测 在创建数据库表或者存储过程的时候,都需要检测是否已经存在同名对象,检测函数如下: Code if exists(select * from sysobjects where type = 'p' and name = 'p_name') begin drop procedure p_name end