What SQL is and why it matters

Meet SQL

SQL (Structured Query Language) is the standard language for working with relational databases. You state the result you want, and the database chooses how to produce it.

Use it for common jobs

  • Read selected rows and columns
  • Add, edit, and remove data
  • Define tables and relationships
  • Summarize data with calculations

Think in sets

Most SQL statements operate on a set of rows rather than processing one row at a time. This query asks for every active course.

SELECT title
FROM courses
WHERE active = 1;

Expect dialect differences

SQLite, PostgreSQL, and MySQL share core SQL, but types, date functions, auto-generated keys, and advanced features can differ. The examples in this course use portable SQL where possible and run naturally in SQLite.