Subject | Re: [firebird-support] Question on JOINS |
---|---|
Author | Martijn Tonies |
Post date | 2006-01-23T21:43:50Z |
Hello Paul,
no matches in the JOIN condition.
to read.
Take a look here:
http://www.w3schools.com/sql/sql_join.asp
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> Let's say I have the following select statement:Gets all rows in table A even though there are
>
> Select a.Field1, b.Field2
> From A
> Join B on A.KeyField1 = B.KeyField2
>
> Instead of JOIN, what is the difference between the following:
>
> 1. Left Join
no matches in the JOIN condition.
> 2. Right JoinSee (1), but the other way around.
> 3. Left Outer JoinSame as (1).
> 4. Right Outer JoinSee above.
> 5. Left Inner JoinAs far as I know, does not exist.
> 6. Right Inner JoinSame here.
> 7. Join <-- Just plain old JOIN is valid as well, right?Firebird likes (7) more than (8) and IMO, it's also easier
>
> OR
>
> 8. A different approach:
>
> Select a.Field1, b.Field2
> From A, B
> Where A.KeyField1 = B.KeyField2
>
>
> Which is better 1 - 8? Why?
> I've always used #1 only, and I'm wondering if this is wrong and if so,
> for what scenarios.
to read.
Take a look here:
http://www.w3schools.com/sql/sql_join.asp
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com