有沒有辦法做到這一點較短,例如在Transact-sql中使用某種條件運算符?Transact-sql中的條件運算符
IF @ParentBinaryAssetStructureId = -1
BEGIN
SET @ParentBinaryAssetStructureId = NULL
END
UPDATE BinaryAssets.BinaryAssetStructures
SET ParentBinaryAssetStructureId = @ParentBinaryAssetStructureId
WHERE BinaryAssetStructureId = @OriginalBinaryAssetStructureId