Multiple conditions in JOIN statement
You can put multiple conditions in your LEFT, RIGHT and INNER/OUTER joins if you want.. below a small example that will give you the idea.
SELECT tbl.id, tblo.naam
FROM sometable tbl
LEFT JOIN someothertable tblo ON tblo.id = tbl.id
AND tblo.function = tbl.function
ORDER BY ....
Didn't know this one.. could have saved me a lotta query's in the past :-(
16997 viewed | 6 opinion(s) | del.icio.us | Digg it | Tjarko @ 01/06/05 0:00 cet


