powered by
Helper command to alter a column's data type via ALTER TABLE.
pg_alterColumnType(column_name, data_type, using = NULL)
A string, PostgreSQL helper statement to alter a column type using ALTER TABLE.
A string, the name of the column to add.
A string, the data type of the column to add.
A string, a command to cast the column into the appropriate type.
pg_alterColumnType( column_name = "newCol", data_type = "text" )
Run the code above in your browser using DataLab