Hi,
Can anyone tell me which of the following is the best/most efficient way of performing a left outer join and what the differences are?
I had always assumed the first would be fastest
Thanks
Rick
Can anyone tell me which of the following is the best/most efficient way of performing a left outer join and what the differences are?
Code:
SELECT
a.a_name
q.q_text
FROM
question q
LEFT OUTER JOIN answer a ON a.q_ID = q.q_ID and a.a_valid = 1
Code:
SELECT
a.a_name
q.q_text
FROM
question q
LEFT OUTER JOIN (SELECT a_name, a_ID FROM answer WHERE a_valid = 1) a ON a.q_ID = q.q_ID
I had always assumed the first would be fastest
Thanks
Rick