if exists (select top 1 * from sysobjects where id = object_id(N'[所有者.]表名') and type='U')2).判断临时表是否存在
if object_id('tempdb..##temp') is not null3).判断存储过程是否存在
if exists (select top 1 * from sysobjects where id=object_id('[所有者.]存储过程名') and type='P') 4).判断视图是否存在
if exists (select top 1 * from sysobjects where id=object_id('[所有者.]视图名') and type='V')
评论(0)
暂无评论。