What is SQL?
SQL (Structured Query Language) is the language you use to talk to databases. You write simple English-like commands to ask questions about your data, add new records, update existing ones, or delete what you don't need.
The Big Picture
SQL sits between you and your data. Here's the full flow from question to answer:
ð§ Explain Like I'm 12
Imagine a huge library with thousands of books. SQL is like the librarian. You walk up and say "Find me all the science fiction books published after 2020, sorted by rating." The librarian (SQL) knows exactly where to look, grabs the right books, and hands them to you in a neat pile. You don't need to know which shelf they're on — you just describe what you want.
What is SQL?
SQL stands for Structured Query Language. It was invented in the 1970s and is still the most widely used language for working with data. Every time you use an app that stores information — your bank, social media, online shopping — SQL is almost certainly running behind the scenes.
SQL is declarative: you describe what you want, not how to get it. You say "give me all orders over $100" and the database figures out the fastest way to find them. This is the opposite of most programming languages where you write step-by-step instructions.
Who is it for?
Anyone who works with data. Backend developers write SQL to power their apps. Data analysts use it to answer business questions. Data scientists query databases before building models. Even product managers learn basic SQL to pull their own numbers instead of waiting on engineers.
If you can write a sentence, you can write SQL. It reads almost like English.
What can you do with SQL?
- Query data — ask questions and get answers from millions of rows in milliseconds
- Filter and sort — narrow down results to exactly what you need
- Combine tables — JOIN data from different tables to see the full picture
- Aggregate — count, sum, average, find min/max across groups of data
- Insert, update, delete — modify data, not just read it
- Create structure — define tables, columns, and relationships
- Control access — grant and revoke permissions on who can see what
Where does SQL run?
SQL runs on a database engine. The most popular ones are:
The core SQL language is the same across all of them. Once you learn it, you can use any database.
What you'll learn
This topic covers core concepts plus deep dives. Each one builds on the last:
Test Yourself
What does SQL stand for?
Is SQL declarative or imperative? What's the difference?
Name two database engines that use SQL.
What are the four main things you can do with data using SQL?