Passer au contenu
English
Changing a table's structure

A table's design is not fixed. ALTER TABLE … ADD adds a new column to an existing table:

ALTER TABLE product ADD weight DECIMAL(5, 2);

Existing rows get NULL in the new column until you fill them in.

ALTER TABLE student ADD email TEXT adds an email column, NULL for the existing rows

Fiche de cours

Se connecter ou créer un compte

IGCSE, A-Level & AP