4 ms·
Am I the only one who puts commas on the next line? I think of them as an operator analogous to AND or ON: select t1.col1 as col1 , t2.co
by nerdponx 10y ago
Am I the only one who puts commas on the next line? I think of them as an operator analogous to AND or ON:
select
t1.col1 as col1
, t2.col2 as col2
, t2.col3 as col3
It makes commenting out columns painless.
- _1 10y agoSame here ... except the first field would be on the same line as the select, and the comma would be aligned with select's "t"
- bigato 10y ago> It makes commenting out columns painless. No it does not. If you have to comment out the first column you'll have to remove the comma from the second column. It's the same problem that happens if you put the commas at the end of the line, except that the offending line will be the last column. So putting commas at the beginning just makes it look weird because it differs from how we use commas in natural language.
- matwood 10y agoExactly, You're also hiding the most important part of the line which is the variable name.
- __jal 10y agoYou're not the only one, but I wish you were, because then I'd have to read a lot less of it. I doesn't eliminate your commenting problem, it moves your commenting problem from the last line of your list to the first. Also, it is visually distracting as all get out.
- nthcolumn 10y agoYes I do. As you say so I can comment out easily but not so much on with the 'as' and maintaining the river.