Check out example codes for "postgresql change column to not null". It will help you in understanding the concepts better.
Code Example 1
-- To change a column to NOT NULL:
ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;
Learn ReactJs, React Native from akashmittal.com