I've created a database and table ("sesame") in MySQL and populated it with 55 pre-existing values from a former spreadsheet. Now I'm writing a PHP script that will allow additions to the table in the future. I have a field ("id") to hold a unique identifier for each record. The existing records have "id" values from 1 to 55, so I want future additions to start the auto_incrementing from 56.
But when I give the following command from the MySQL CLI
Code:
ALTER TABLE sesame MODIFY COLUMN id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT = 56;
I get an error message that tells me to look for the "right syntax to use near '= 56' at line 1".
I've tried various permutations of the MODIFY TABLE command, but keep getting error messages. Any ideas what I should be using?