Tables, Rows, and Columns
Four vocabulary words. After these, every SQL tutorial will feel approachable.
The mental model — it's a spreadsheet
A SQL table looks exactly like a spreadsheet. The terms are just more precise.
| id | name | signup_date | |
|---|---|---|---|
| 1 | Anita Rao | anita@example.com | 2025-08-12 |
| 2 | Bob Lin | bob@example.com | 2025-09-01 |
| 3 | Cara Patel | cara@example.com | NULL |
Three concepts visible here:
| Term | What it is | In the example |
|---|---|---|
| Table | The whole grid | The 3-row block above |
| Column | A vertical category | id, name, email, signup_date |
| Row (also called a "record") | One horizontal entry | The line 2 / Bob Lin / bob@example.com / 2025-09-01 |
| Field | One specific cell | bob@example.com (Bob's email field) |
You'll hear "row" and "record" used interchangeably. Same thing.
The fourth concept — NULL
Look at the signup_date for Cara Patel above. It says NULL.
NULL means "no value" — explicitly the absence of data.
It is NOT:
- ❌ The number zero (
0) - ❌ An empty string (
"") - ❌ A space (
" ")
It's a distinct thing meaning "this field has no value at all."
Why does NULL matter?
SELECT * FROM users WHERE signup_date = NULL; -- ⚠️ Returns NOTHING
SELECT * FROM users WHERE signup_date IS NULL; -- ✅ Returns Cara's row
You can't use = with NULL. SQL requires IS NULL or IS NOT NULL specifically. This trips up almost every beginner. Remember the rule:
NULL is not equal to anything — not even itself. Use
IS NULL/IS NOT NULL.
Why all this matters
When you write a query like:
SELECT name FROM users WHERE signup_date IS NOT NULL;
You're saying:
- "From the
userstable" - "give me the
namecolumn" - "for every row where the
signup_datefield has an actual value (not NULL)"
That's the entire mental model. Every SQL query, no matter how complex, decomposes into operations on tables, rows, columns, and fields.
Quick reference
| You want to... | The SQL operates on... |
|---|---|
| Get certain users | rows (filtered) |
| Get certain info about users | columns (selected) |
| Add a new user | a row (inserted) |
| Add a new piece of info to every user | a column (added) |
| Change one user's email | a field (updated) |
See it for yourself
Everything above is easier to believe once you have run it. This is a real
employees table in a sandboxed database — press Run.
SQLSELECT emp_id, first_name, last_name, salary FROM employees ORDER BY emp_id LIMIT 5;
Five rows, four columns, and each cell is a field.
And here is a NULL
One employee has no salary recorded. Notice the result says NULL rather than
showing an empty space — that difference matters, and the next lesson explains
why an empty string and a NULL are not the same thing.
SQLSELECT first_name, last_name, salary FROM employees WHERE salary IS NULL;
= NULL would return nothing at all here. NULL is not a value you can compare
with =; it means unknown, and only IS NULL tests for it.
What's next
In the final lesson of this module, SQL Command Categories, we'll group the SQL verbs you'll use into four families — DDL, DML, DCL, DQL — so you know which category a command belongs to without having to memorize anything.