3 ms·
My personal style has a lot of similarities, but with some glaring differences. The biggest is that I put the comma in front of the next item, rather than trai
by btilly 14y ago
My personal style has a lot of similarities, but with some glaring differences. The biggest is that I put the comma in front of the next item, rather than trailing the one before. What this means is that when I add a new thing to the list of columns, I'm less likely to leave one out.
See http://bentilly.blogspot.com/2011/02/sql-formatting-style.html http://bentilly.blogspot.com/2011/02/sql-formatting-style.ht... for what this looks like in practice.
- Svip 14y agoYou also write FROM/JOIN/ON indentations like I do.
- radiowave 14y agoI put the commas in front as well, but the reason I started doing it that way is that you can then comment out (and uncomment) any column without breaking the query.
- r00fus 14y agoI use this formatting style as well - it's also easier to format as the columns can all be aligned with tabs.