by jgilfillan · 10y ago · 0 comments
select
col1
,col2
,col3
from table1 a
left join table 2 b
on a.col1 = b.col2
where 1=1
and col1 = 'condition'
and col2 = 'condition2'
;
* everything lower case (except strings)
* leading commas
* conditions indented by two spaces
* select columns indented by two spaces, except the first colunm which is indented by three.
* where 1=1 for easier commenting/uncommenting of conditions