ALTER TABLE, set null in not null column, PostgreSQL 9.1
ALTER TABLE person ALTER COLUMN phone DROP NOT NULL;
More details in the manual: http://www.postgresql.org/docs/9.1/static/sql-altertable.html
Execute the command in this format
ALTER TABLE tablename ALTER COLUMN columnname SET NOT NULL;
for setting the column to not null.
Execute the command in this format:ALTER [ COLUMN ] column { SET | DROP } NOT NULL
First, Set :
ALTER TABLE person ALTER COLUMN phone DROP NOT NULL;