Entering the following command into a PostgreSQL interactive terminal results in an error: What is the correct command to alter the data type of a column? Answer See documentation here: http://www.postgresql.org/docs/current/interactive/sql-altertable.html
Tag: alter-column
Change a Nullable column to NOT NULL with Default Value
I came across an old table today with a datetime column called ‘Created’ which allows nulls. Now, I’d want to change this so that it is NOT NULL, and also include a constraint to add in a default …