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  How to detach a policy from an IAM user