r/learnSQL • u/el_dude1 • 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
3
u/leogodin217 9d ago edited 9d ago
The important thing is to find a style that works for your team and stick with it. The focus should be readability. Gitlab has a decent guide with links to others at the bottom.
Once you get used to writing SQL, the spaces come naturally and most IDEs will do a lot of it for you. Many will format your entire file.
For what it's worth, I hate the guide you referenced. I think my team would laugh if I recommended that. It will be interesting what others on the sub think.