When creating a data table in TiDB, should an intermediate table also have an ID primary key?

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

Original topic: tidb创建数据表时,创建一个中间表,这个表还需要创建id主键吗

| username: TiDBer_VGWxY8nV

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 5.4
When creating a data table in TiDB, if an intermediate table is created, does this table still need to have an ID primary key?
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issues: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: h5n1 | Original post link

It depends on your business needs and whether there is downstream CDC synchronization. TiDB supports global temporary tables, you can take a look.

| username: tomsence | Original post link

Temporary tables are not compatible with partitioning and region sharding features, and personally, I don’t think they are necessary.