这是我试图创建的存储过程:
CREATE PROCEDURE [cih_owner].[UpdateDisplayOrder]
@CbpTableName varchar (21),
@CbpObjId int,
@CbpId int,
@DisplayOrder int
AS
BEGIN
IF (@CbpTableName = "CbpActivity")
BEGIN
UPDATE [cih_owner].[CbpActivity] SET DisplayOrder = @DisplayOrder WHERE Id = @CbpObjId AND CbpId = @CbpId
;
END
END
GO
然而,一行写着:
(@CbpTableName = "CbpActivity")
我得到
"CbpActivity"
了错误
下面的波浪线Invalid column name 'CbpActivity'
我要做的就是比较我发送到存储过程的字符串。
谢谢!