Created
July 12, 2013 08:46
-
-
Save ritasker/5982886 to your computer and use it in GitHub Desktop.
How to declare and use a SQL variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @UserId as int | |
SET @UserId = 8521 | |
DELETE FROM UserAudits WHERE UserFk = @UserId | |
DELETE FROM Users WHERE Id = @UserId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment