我有以下存储过程:
ALTER PROCEDURE [dbo].[CheckAdminExists]
@SID NVARCHAR(50),
@AdminName NVARCHAR(MAX)
AS
SELECT
Administrator.ID
FROM
Administrator
WHERE
Administrator.SID = @SID
AND Administrator.Name = @AdminName
GO
现在我想用这样的代码创建另一个 SP:
IF NOT NULL (EXECUTE CheckAdminExists 'S-1','Admin')
--do something
ELSE
--do something else
这样做的正确语法是什么?