|
-
May 30th, 2007, 03:54 AM
#1
Thread Starter
Fanatic Member
Inner Join V/s Left Join
Hi
I want to know the difference between the use of Inner Join and Left Join in a SQL Statement
thanks
-
May 30th, 2007, 04:05 AM
#2
Re: Inner Join V/s Left Join
You can read the FAQ - it should be in there
Inner Join:
Bring only records that exist in both the left table and right table.
Left join:
Bring all records in the left table and only those that match from the right table. (uses null for those none matched)
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 30th, 2007, 12:29 PM
#3
Addicted Member
Re: Inner Join V/s Left Join
There's also good examples on wikipedia on all type of joins
http://en.wikipedia.org/wiki/Join_(SQL)
-
May 30th, 2007, 01:46 PM
#4
Re: Inner Join V/s Left Join
This might be worth taking a look at.
-
May 30th, 2007, 03:03 PM
#5
Re: Inner Join V/s Left Join
Real world...
We use LEFT JOIN 99% of the time.
Although referential integrity should allow INNER JOIN since both sides should almost always exist, since we have legacy data converted from mainframes we would not want to lose the "FROM" table data simply because the "LEFT JOIN" table does not offer up a matching row.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|