Reputation: 121
I want to modify Primary key of an existing Table in Spanner from Col1 to combination of Col1 and Col2. Is it possible to do it in Spanner?
This option is not available in Console. Maybe it can be done with a script!
Upvotes: 3
Views: 4888
Reputation: 121
GCP Team responded below:
Upvotes: 1
Reputation: 1533
The keys of a table can't change; you can't add a key column to an existing table or remove a key column from an existing table.
Schema and data model | Cloud Spanner Documentation | Google Cloud
Upvotes: 4