我正在尝试创建一个存储过程,但我收到此错误“删除附近的语法不正确,期望选择或”(“”
CREATE PROCEDURE NSP166_DeleteDMSPermission
@PermissionID uniqueidentifier ,
@FunctionalDetailsId uniqueidentifier
AS
BEGIN
if(SELECT count(PermissionID) AS counts FROM NSP166_RolePermissionTrans where PermissionID=@PermissionID)>1
(
delete from NSP166_RolePermissionTrans where FunctionalDetailsId=@FunctionalDetailsId
)END