Subject | SQL statment needs to be reviewed |
---|---|
Author | william_yuwei |
Post date | 2004-12-13T23:22:40Z |
Hi, All
I have following SQL statement:
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), 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"?
Thanks
William
I have following SQL statement:
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), 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"?
Thanks
William