How to add Sort and Dist Keys to an existing Redshift table

Command to Add or Modify a Sort key:

ALTER TABLE schema.table_name ALTER SORTKEY (column_name);

Command to Add or Modify a Dist Key:

ALTER TABLE schema.table_name ALTER DISTKEY (column_name);
See also  EXCEPT operator in Redshift Database