postgresql add not null constraint
snippet in sql

postgres add not null to existing column

user9597

ALTER TABLE table_name ALTER COLUMN column_name SET NOT NULL;

postgresql change column to not null

user7392

-- To change a column to NOT NULL:
ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;

postgresql add not null constraint

user1812

alter table users alter column email set not null;