Get the latest tech news

SQL style guide by Simon Holywell


A consistent code style guide for SQL to ensure legible and maintainable projects

The following suffixes have a universal meaning ensuring the columns can be read and understood easily from SQL code. This forms a river down the middle making it easy for the readers eye to scan over the code and separate the keywords from the implementation detail. Sometimes it will make sense to have the closing parenthesis on a new line at the same character position as its opening partner—this is especially true where you have nested subqueries.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of SQL

SQL

Photo of Simon Holywell

Simon Holywell

Photo of SQL style guide

SQL style guide

Related news:

News photo

Sampling with SQL

News photo

The Prompt() Function: Use the Power of LLMs with SQL

News photo

Are You Qualified to Use Null in SQL?