[Durham] SQL LEFT JOIN help...

Richard Patterson Richard at helpquick.co.uk
Mon Nov 22 06:44:06 UTC 2010

> If you're just after brevity, try:
> SELECT o.id, o.order_ref, con.contact_surname, com.company_name FROM orders o LEFT JOIN (contacts con, companies com, addresses a)
> ON (o.contact_id=con.id AND con.company_id = com.id  AND o.address_id=a.id);

Thanks Brian, that's just what I was after! I owe you a couple of beers ;-)



More information about the Durham mailing list