Can TiDB Add Primary Key Index Later?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIDB可以后添加主键索引吗

| username: 小于同学

Can TiDB add a primary key index later?

| username: 啦啦啦啦啦 | Original post link

Currently, only adding and deleting operations for NONCLUSTERED primary keys are supported; CLUSTERED is not.

| username: dba远航 | Original post link

Only supports adding and deleting operations for NONCLUSTERED primary keys.

| username: 烂番薯0 | Original post link

Clustered primary keys can only be added when creating the table, while non-clustered ones can be added later.

| username: kelvin | Original post link

Support adding and deleting NONCLUSTERED primary keys.

| username: TiDBer_rvITcue9 | Original post link

Only supports adding and deleting operations for NONCLUSTERED primary keys.

| username: Hacker_QGgM2nks | Original post link

Non-clustered is fine.

| username: 健康的腰间盘 | Original post link

Non-clustered can be added.

| username: TiDBer_vJGTQABF | Original post link

Non-clustered can be added, clustered cannot.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.