How can we change the columns datatype in PostgreSQL?

devquora
devquora

Posted On: Feb 22, 2018

 

Use change column type statement with ALTER TABLE command to change a column type in PostgreSQL.

Example

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

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Postgresql Interview Questions

    List some of the features of Postgresql ?

     Following are some of the features of Postgresql : Object-relational database Support and Extensibility for SQL fle..

    Postgresql Interview Questions

    What is the option that can be used in PostgreSQL to make transactions see rows affected in previous parts of the transaction?

     The SQL standard is defined by four levels of transaction isolation basically regarding three phenomena. The three phe..

    Postgresql Interview Questions

    Put some light on Multi-Version concurrency control?

     MVCC or better known as Multi-version concurrency control is used to avoid unwanted locking of the database. The time ..