A Record of Adding a Composite Primary Key Issue 8200

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

Original topic: 记一次添加联合主键8200问题

| username: 希希希望啊

【TiDB Usage Environment】Production environment 7.5.1
【TiDB Version】7.5.1
【Reproduction Path】Existing business table, adding a composite primary key
【Encountered Problem: Phenomenon and Impact】Unable to add, 8200-Unsupported operate same column 'health id
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshot/Logs/Monitoring】

| username: 希希希望啊 | Original post link

Solution:
Method 1: Add columns one by one, then add the primary key.
Method 2: Delete data, drop the table, and re-execute the table creation DDL statement.