Advertisement
Guest User

Untitled

a guest
Sep 6th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. select * from Table where ID = 7 and Flag = 1
  2. UNION
  3. select * from Table where ID = 7
  4. WHERE NOT EXISTS (select * from Table where ID = 7 and Flag = 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement