Tag

composite key

1 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 23, 2024 · Databases

Changing a Primary Key to a Composite Key in TDSQL for MySQL: Dealing with sql_require_primary_key

This article explains why TDSQL for MySQL refuses to drop a primary key when the sql_require_primary_key variable is ON, analyzes the underlying parameter behavior, and provides two practical solutions—temporarily disabling the variable or combining drop and add statements—to safely convert a single‑column primary key into a composite key.

Database AdministrationMySQLTDSQL
0 likes · 7 min read
Changing a Primary Key to a Composite Key in TDSQL for MySQL: Dealing with sql_require_primary_key