问题:如果我将 IF not exists 添加到创建过程作为外部名称语句,我会收到语法错误...为什么?如果我分别运行它们,这两个语句都可以正常工作......
IF NOT EXISTS
(
SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'PriceSum')
AND type in (N'P', N'PC')
)
CREATE PROCEDURE PriceSum(@sum int OUTPUT)
AS EXTERNAL NAME MyFirstUdp.[SQL_CLRdll.MySQLclass].PriceSum