Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @QuerySelector int = 3;
- IF @QuerySelector = 1
- BEGIN
- SELECT TOP 3 ProductID, Name, Color
- FROM Production.Product
- WHERE Color = 'Silver'
- ORDER BY Name
- END
- ELSE
- BEGIN
- SELECT TOP 3 ProductID, Name, Color
- FROM Production.Product
- WHERE Color = 'Black'
- ORDER BY Name
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement