arrow_backwardBack to Amazon Redshift code examples

Amazon Redshift Alter Column Nullable Example

How to change the nullable flag on a Amazon Redshift table column
Turning nullable off
ALTER TABLE
  "users"
ALTER COLUMN
  "important_column"
SET
  NOT NULL
Turning nullable on
ALTER TABLE
  "users"
ALTER COLUMN
  "not_important_column" DROP NOT NULL

Using Beekeeper Studio?

Beekeeper Studio is a free and open source database manager for Windows, Mac, and Linux.

This feature is baked right in, so there's no need to manually type SQL every time. Access column editing by right-clicking on a table in the sidebar and clicking 'View Structure'.

Download Beekeeper Studio