powered by
Helper command to add a column via ALTER TABLE.
pg_addColumn( column_name, data_type, default = NULL, constraint = NULL, if_not_exists = FALSE )
A string, PostgreSQL helper statement to add a column 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 default value for the column to add.
A string, a constraint for the column to add.
Boolean, if TRUE, adds IF NOT EXISTS to the ADD COLUMN statement.
pg_addColumn( column_name = "newCol", data_type = "text" )
Run the code above in your browser using DataLab