From the course: SQL for Non-Programmers

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Formatting your query

Formatting your query - SQL Tutorial

From the course: SQL for Non-Programmers

Formatting your query

Now that you've gotten your hands dirty with some SQL programming, before we move on, let's touch on how best to format your queries. It's important to review query writing best practices before diving deeper into coding, because good habits make for good coding, and it's easier to enforce these good habits if we use them from the start. You should always have top of mind how to write your queries in an intuitive, readable manner. Why does this matter? If you don't keep a clear and consistent pattern in the style of your queries, you can quickly create confusing code, confusing for you if you come back and reference it later, or confusing for your team. There are not necessarily established guidelines for SQL queries, but there are best practices and recommendations that you can follow to write code like a pro. You may have already noticed that in our previous queries, I was using uppercase letters for the SQL keywords like SELECT and FROM, and lowercase letters for the column and…

Contents