Is it possible to use multiple left joins in sql query?
    LEFT JOIN         ab      ON         ab.sht = cd.sht   i want to add to attach one more query like this to it? will it work?
    LEFT JOIN         ab AND aa     ON         ab.sht = cd.sht            AND         aa.sht = cc.sht   Will this work?
Yes it is possible. You need one ON for each join table.
LEFT JOIN ab   ON ab.sht = cd.sht LEFT JOIN aa   ON aa.sht = cd.sht   Incidentally my personal formatting preference for complex SQL is described in http://bentilly.blogspot.com/2011/02/sql-formatting-style.html. If you're going to be writing a lot of this, it likely will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With