Learn SQL Lesson

Tables, Rows, and Columns

Before writing any SQL, it helps to understand how data is organized in a database.

The core building block is a table. A table is a lot like a spreadsheet: data is arranged in rows and columns.

Each column represents a property — for example "name", "department", or "salary". Every column has a header that describes what it holds.

Each row is one record — one employee, one order, one measurement. Every row contains a value for each column.

This is what makes the data structured: every row follows the same shape. There are no surprises — if the table has five columns, every row has exactly five values.

Open interactive editor