Enforce non-nullability on a column.
Section: Schemas, Tables, and Core DDL
Set NOT NULL
sql
sql
ALTER TABLE public.users ALTER COLUMN email SET NOT NULL;Explanation
Existing rows must already satisfy the constraint.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Schemas, Tables, and Core DDL