I have an existing database with a key called myfile_id
(int
) . The code that I am working with wants it to be between 10,000 and 65,000 and there are already random entries in the database that i can't change (so there are random values between 1 and 65,000 already that I can't drop/change).
I want to set a constraint for the key to be non-Null, unique and for the keys to be auto-incrementing from 10,000 (but skip an existing value that comes in). How do I do this in Mysql?