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  How to remove a user from a group in Redshift database