

You’ll usually mess up the first few times before you get it right. It’s sort of like making an order at a restaurant: you need to tell the database exactly what you want, and it will serve up the data you asked for. A SQL query can be as short as a few words, or as long as hundreds of lines. When you write SQL, you’re building what’s called a query: every “piece” of SQL you write will return one set of data. So the specific syntax of how you write SQL depends on which database you’re using.

Each database like PostgreSQL or MySQL has its own lil’ flavor of SQL, and that’s what’s more analogous to a language.
TABLEPLUS WACKY HOW TO
It’s a standard (like a blueprint) for how to query data, sort of like directions for building a language. SQL stands for Structured Query Language, but that’s a misnomer SQL isn’t actually a programming language like Javascript or Python.

SQL is a programming language that lets you pull that data and rearrange it: add things together, group over time, replace dollar signs, you name it. What is SQL, exactly?ĭata in a database is almost never in the format you need it to be in. But that’s mostly for engineers and database admins, so this post will focus on reading data – probably 99% of what you want to do. One very, very important caveat: SQL queries can write data to a database, not just read it.
