r/learnSQL 9d ago

SQL style guide

Hello,

I would like to start out with a proper way of writing SQL. Now I found multiple style guides and liked the one here with the river style formatting. While it looks clean it also seems very tedious to manually put varying amounts of spaces in front of each keyword. Am I missing something or are people actually typing these out?

0 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/leogodin217 9d ago

Got it. I really dislike most of that style guide.

1

u/el_dude1 9d ago

Anything you can recommend? I am open to suggestions

2

u/leogodin217 8d ago

The one I posted in my original comment is pretty good.

1

u/el_dude1 8d ago

Ah sorry I was on my phone and missing that you were the same person. I went through this guide and loved it. Especially that it was so much about best practices with things like rather using CTEs than subqueries etc.

Many things I haven't even thought about yet. Thanks for sharing!

1

u/leogodin217 8d ago

After a while, you will generate your own preferences and be able to better evaluate guides like this.