Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.83 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Mysql Query Inner Join
  2. SELECT E.Name        
  3. FROM Eatables E INNER JOIN
  4. Confirm_Eatables CE ON CE.Eatbles_Id != E.Sno
  5.        
  6. SELECT E.Name        
  7. FROM Eatables E INNER JOIN
  8. Confirm_Eatables CE ON CE.Eatbles_Id != E.Sno
  9.        
  10. SELECT E.Name        
  11. FROM Eatables E INNER JOIN
  12. Confirm_Eatables CE ON CE.Eatbles_Id != E.Sno
  13.        
  14. SELECT E.Name        
  15. FROM Eatables E INNER JOIN
  16.       Confirm_Eatables CE ON E.Sno != CE.Eatbles_Id
  17. GROUP BY E.Name
  18.        
  19. SELECT a.Name
  20. FROM tblEatables a
  21. LEFT JOIN tblConfirm_Eatables b ON a.Sno = b.Eatables_Id
  22. WHERE b.Eatables_Id IS NULL
  23.        
  24. SELECT a.Name
  25. FROM tblEatables a
  26. LEFT JOIN tblConfirm_Eatables b ON a.Sno = b.Eatables_Id
  27. WHERE b.Eatables_Id IS NULL
  28.        
  29. SELECT E.Name FROM Eatables
  30.                 EXCEPT ALL
  31.   SELECT E.Name FROM Eatables E INNER JOIN
  32.          Confirm_Eatables CE ON CE.Eatbles_Id = E.Sno