5 SQL Bad Habits You Need to Break

From beginners to professionals, chances are we’re all guilty of at least one of the following bad SQL habits.

Zach Quinn
Learning SQL

--

Nurture good SQL habits before starting your first SQL coding project with Learning SQL’s free, 5-page project guide. Download a PDF here.

Bad Habits sign on a bare wall.
Photo by Manan Chhabra on Unsplash

Unlike a bad habit such as smoking, no nicotine gum exists to wean programmers off bad habits in SQL or any other language.

However, unlike smoking, these SQL habits aren’t hurting anyone, so this begs a somewhat obvious question.

Why stop?

You need to stop writing good queries badly for the following reasons:

  • Illegible, hard-to-follow queries are an obvious sign of a beginner (or a beginner who lacks the motivation to self-police and improve)
  • Badly written queries are harder to reproduce or alter (a must if working in a team environment or sharing work with non-technical stakeholder)
  • Your bad habits can spread and become a bad influence on your susceptible teammates (meaning the whole team’s standards for style and syntax go out the window)

Recently, a fellow Learning SQL contributor Aparna Gurav wrote about ways to improve your SQL queries.

--

--

Zach Quinn
Learning SQL

Journalist—>Sr. Data Engineer; new stories every Monday.