我想将 Spanner 中现有表的主键从 Col1 修改为 Col1 和 Col2 的组合。可以在 Spanner 中实现吗?
此选项在控制台中不可用。也许可以用脚本来完成!
最佳答案
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
关于google-cloud-platform - 控制点 : Can we modify primary key of an existing table in spanner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56647996/