The following code is a minimal example from a larger query generated by a backup script (possibly using mysqldump). It results in an error and I don’t know why. Who can help?
CREATE TABLE `tl_custom_tandem_lang` (
`id` varchar(2) COLLATE latin1_german2_ci NOT NULL,
PRIMARY_KEY (`id`),
UNIQUE KEY `id` (`id`)
);
Produces following error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ‘(id), UNIQUE KEYid(id) )’ at line 3
it should be
PRIMARY KEYnotPRIMARY_KEY(remove the underscore to make it work.)