Skip to content
Advertisement

Redshift – How to remove NOT NULL constraint?

Since Redshift does not support ALTER COLUMN, I would like to know if it’s possible to remove the NOT NULL constraints from columns in Redshift.

Advertisement

Answer

You cannot alter the table.

There is an alternative approach. You can create a new column with NULL constraint. Copy the values from your old column to this new column and then drop the old column.

Something like this:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement