How to add a (primary) key to an existing table using SAP HANA

Thorsten Niehues picture Thorsten Niehues · Jun 11, 2015 · Viewed 27.9k times · Source

What is the SQL command to add a (primary) key to a table in SAP HANA?

The ALTER TABLE docu form SAP Library is cryptic to me

Answer

Thorsten Niehues picture Thorsten Niehues · Jun 11, 2015
ALTER TABLE schema.table ADD PRIMARY KEY (column1,column2)