not null constraint psql code example Example: postgresql add not null constraint alter table users alter column email set not null;