How to change Sort key of a table in Redshift database

To modify the existing sort key of a table:

ALTER TABLE tablename ALTER SORTKEY (columnname);
or
ALTER TABLE tablename ALTER SORTKEY (columnname1,columnname2,columnname3);

To remove the existing sort key of a table:

ALTER TABLE tablename ALTER SORTKEY NONE;
See also  [Amazon](500310) Invalid operation: Maximum number of stored procedures allowed exceeded