例子1:
查询dbo.ANALYSIS_SaveOutPatientExpense的存储过程是否存在?
1)新建查询(N),输入
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.ANALYSIS_SaveOrdersDetail') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
print '存在'
else
print '不存在'
2、打印输出
例子1:
查询dbo.ANALYSIS_SaveOutPatientExpense的存储过程是否存在?
1)新建查询(N),输入
if exists (select * from dbo.sysobjects where id = object_id(N'dbo.ANALYSIS_SaveOrdersDetail') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
print '存在'
else
print '不存在'
2、打印输出