How to deal with fields with uniqueness constraints in the case of sub-tables?

how to deal with fields with unique indexes in the case of sub-tables?
there is no guarantee of constraints when adding new ones

May.16,2022

introduces a practice: using a summary table, similar to table_name_increment, insert the summary table before the data is entered into the sub-table, get the id, and record the id in the sub-table.


there are several solutions learn

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8a1b-1ef4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8a1b-1ef4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?