|
|
|
|
|
by jolmg
2556 days ago
|
|
I would do your SQL like this: select a, b
from t1
left outer join t2
on t2.t1_id = t1.id
where t2.c = 'foo'
and t2.d = 'bar';
- Lowercase- I don't like that use of variable number of spaces to try to align things you did in both your examples. Doing that kind of thing in code generally leads to having to readjust that spacing whenever a new line is added or removed. - Constant-width indentation indicates structure. "left outer join" is part of the "from" clause, so it's indented further. "on" is part of the "left outer join" clause, so it's indented further. Among languages, I imagine SQL is the one with the most varied styling among those who use it. |
|