User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 403,516 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,867 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 217 | Replies: 0
Reply
Join Date: Jul 2008
Posts: 33
Reputation: jakesee is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
jakesee jakesee is offline Offline
Light Poster

Is there a shorter version of this query?

  #1  
Jul 16th, 2008
Hi,

I don't know what is LEFT JOIN at all, but i accidentally made this query work. Can someone tell me if there is a shorter version of this query?

  1. SELECT j . * , k.report
  2. FROM (
  3. SELECT x . * , y.category AS parent_category
  4. FROM AccountCategories x
  5. LEFT JOIN AccountCategories y ON x.parent_category_id = y.category_id
  6. ) j
  7. LEFT JOIN AccountReports k ON j.report_id = k.report_id

If possible, would you show me what is the meaning of LEFT JOIN, RIGHT JOIN, INNER JOIN and OUTER JOIN? I've read alot of tutorials but I can only understand CROSS JOIN so far.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the MySQL Forum

All times are GMT -4. The time now is 1:04 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC