Part of the "SQL: Zero to Ninja" series, for junior web devs who want SQL to finally click.

Up to now, the tables already existed. You just queried them. But who decided that price holds numbers and email holds text? Who made sure two users can never share the same email? That was the person who designed the table. Today that person is you.

The idea in one line

CREATE TABLE builds a table, data types say what kind of thing each column holds, and constraints are rules the database promises to enforce so bad data can never sneak in.

The metaphor: a table is a sign-up form