Alter table commands for Redshift

ALTER TABLE table_name OWNER TO new_owner;

ALTER TABLE table_name RENAME TO new_name;

ALTER TABLE table_name ADD column_name column_type;

ALTER TABLE table_name DROP column_name;

ALTER TABLE table_name RENAME COLUMN column_name TO new_name;

ALTER TABLE table_name ALTER COLUMN column_name TYPE new_data_type;

ALTER TABLE table_name ADD CONSTRAINT constraint_name;

ALTER TABLE table_name DROP CONSTRAINT constraint_name;

ALTER TABLE table_name ALTER DISTKEY column_name ;

ALTER TABLE table_name ALTER DISTSTYLE ALL ;

ALTER TABLE table_name ALTER DISTSTYLE EVEN;

ALTER TABLE table_name ALTER DISTSTYLE KEY DISTKEY column_name;

ALTER TABLE table_name ALTER SORTKEY (column_name1, column_name2,…)

See also  How to identify groups that an IAM user belongs to