|
|
|
|
|
by pjungwir
2556 days ago
|
|
I don't like it. :-) Splitting each clause into two lines makes my eyes stumble. I can't read it as effortlessly as I read normal text. At least you are left-aligning the keywords though. :-) I have two spaces after my SELECT because when you press tab that's where you wind up next. Keeping things tab-aligned lets you easily type it out without a lot of fuss. I think that gets you much of the benefit of your broken-line clauses without impairing reading flow. Also on a monitor vertical space is scarce, so I'd like to keep that reasonably compressed. I get how leading commas makes it easy to re-order projections but I've never heard anyone say it makes them easier to read. :-) (I have no problem putting them on multiple lines if you have a lot or some are long.) And I'd rather optimize for readability over not needing to add/remove a comma. I can see why you'd indent `ON` although I prefer to keep its conditions at the same level as WHERE. I also do the semicolon at the bottom thing a lot. Anyway it's fun to trade tastes. :-) SQL is surprisingly hard to rule on when it gets complicated. I doubt I am consistent once I start adding subqueries, CASE, etc. |
|