code_junkie

Deleting rows in joined tables using ADO

Nov 11th, 2011
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. SELECT Elements.*, Groups.GroupName
  2. FROM Elements
  3. INNER JOIN Groups ON Elements.IdGroup = Groups.IdGroup
  4.  
  5. SELECT Elements.*,
  6. (
  7. SELECT Groups.GroupName
  8. FROM Groups
  9. WHERE Elements.IdGroup = Groups.IdGroup
  10. )
  11. FROM Elements
  12. WHERE EXISTS (
  13. SELECT *
  14. FROM Groups
  15. WHERE Elements.IdGroup = Groups.IdGroup
  16. );
Add Comment
Please, Sign In to add comment