Check out example codes for "how to change column type psql". It will help you in understanding the concepts better.

Code Example 1

ALTER TABLE table_name
ALTER COLUMN column_name [SET DATA] TYPE new_data_type;
 

Code Example 2

ALTER TABLE assets ALTER COLUMN name TYPE VARCHAR;

Code Example 3

ALTER TABLE table_name
ALTER COLUMN column_name [SET DATA] TYPE new_data_type;

Learn ReactJs, React Native from akashmittal.com