What Is SQL?
SQL is a practical way to ask structured questions about rows and columns.
SQL is a language for working with tables. A table is organized into columns, which describe what each value means, and rows, which hold individual records.
A SQL query doesn't change the original table unless you use commands built for changing data. In these first lessons, queries only read data and return a temporary result.
select column_names
from table_name Schema · Garden Shop Table · customers 9 columns · 20 rows
One row per customer. Some customers have no phone on file.
Run the starter query, then change it to show each customer's first name, last name, city, and state.
Run your query to inspect the result.
Expected answer
- Columns: first_name, last_name, city, state.
- Rows: 5 customers.
Related
Clause order and the shape of a SELECT query.
SELECT, WHERE, ORDER BY, and LIMIT at a glance.
WHERE is evaluated before SELECT aliases exist.
The parser stopped at the first word it could not use.
No table in the FROM clause has that column.
Learn the basic shape of relational data.