How to increase the lenght of a character varying datatype in PostgreSQL without data loss

No Comments

Run the following command

alter table TABLE_NAME alter column COLUMN_NAME type character varying(120);

This will extend the character varying column field size to 120.

Remember to change TABLE_NAME to the relevant table name and COLUMN_NAME to the relevant column name.

Image Credits: Photo by Isis França on Unsplash.

Related Articles

No results found

Leave a Reply

avatar
  Subscribe  
Notify of
Menu
Copy link