Check out example codes for "postgresql add not null constraint". It will help you in understanding the concepts better.

Code Example 1

alter table users alter column email set not null;

Code Example 2

ALTER TABLE table_name ALTER COLUMN column_name SET NOT NULL;

Learn ReactJs, React Native from akashmittal.com