Subject Re: [firebird-support] SQL statment needs to be reviewed
Author Arno Brinkman
Hi,

> select a.ID AS CLIENTID, c.* from CONTACTS c
> left join CLIENTS a on a.CONTACT_ID = c.ID
> where c.Proxy_name containing '' and c.CONTACT_TYPE = 'C'
> order by c.Proxy_Name
>
> I suppose that "left join" = "left inner join" (correct me if I'm
> wrong),

There's no LEFT INNER JOIN

> What happend was that the result returns all the record
> include those record which ClientID = null, which BTW, I don't have
> such the records in Clients table, seems it used "left outer join"
> instead.
>
> If I changed it to "inner join", then everything worked just fine.
>
> so "LEFT JOIN" <> "INNER JOIN"?

Yes :-)

[INNER] JOIN
LEFT [OUTER] JOIN
RIGHT [OUTER] JOIN
FULL [OUTER] JOIN

See http://www.w3schools.com/sql/sql_join.asp

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81