Advertisement
Fhernd

t-sql_r2.3.sql

Apr 5th, 2015
15,001
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.29 KB | None | 0 0
  1. DECLARE @QuerySelector int = 3;
  2. IF @QuerySelector = 1
  3. BEGIN
  4.     SELECT TOP 3 ProductID, Name, Color
  5.     FROM Production.Product
  6.     WHERE Color = 'Silver'
  7.     ORDER BY Name
  8. END
  9. ELSE
  10. BEGIN
  11.     SELECT TOP 3 ProductID, Name, Color
  12.     FROM Production.Product
  13.     WHERE Color = 'Black'
  14.     ORDER BY Name
  15. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement