Sure you can do that.
SELECT * FROM Tab1
LEFT JOIN Tab2 ON Tab1.field1=Tab2.field1
LEFT JOIN Tab3 ON Tab1.field1=Tab3.field1
LEFT JOIN Tab4 ON ...

You can mix and match many different joins on many tables. The only problem you really run into is complexity. You could even do something like this:
SELECT * FROM Tab1,Tab4
LEFT JOIN Tab2 ON Tab1.field1=Tab2.field1
LEFT JOIN Tab3 ON Tab1.field1=Tab3.field1 AND Tab4.field2=Tab3.field2
WHERE Tab1.field3=Tab4.field3


Your left join on Tab3 uses the result of the straight join on Tab1 and Tab4.


On Thursday, July 10, 2003, at 10:07 AM, Krasimir_Slaveykov wrote:


Hello mysql,

If I have one main table - Tab1 and 2 or more tables wich are related
with Tab1, but Tab2 possibly will have records for each in Tab1 ot
possibly not. Tab3-too.
So I need to join Tab1 with Tab2 with LEFT JOIN and Tab1 with Tab3 -
with LEFT JOIN too.
Is that possible? ... and if YES  ... how to write in SQL statement?
Thanks.

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to