MySQL Forums
Forum List  »  Newbie

MySQL statement to insert data in non consecutive primary key id
Posted by: Dina Amiri
Date: January 02, 2022 02:54PM

Hi!
I am learning MySQL, the instructor gave us an assignment from two tables in a database(...) I created a table employees table where:
employeessn INT(6) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Now I want to insert data for employees number 298082, 238980, 328789
How do I do that? Maybe I shouldn't have set employeesssn as AUTO_increment. Only stating that it's a primary key guarantees that's it's not going to accept duplicates? Can I insert data for only the above mentioned employees ids? If yes what is the statement?
Thank you very much in advance.

Options: ReplyQuote


Subject
Written By
Posted
MySQL statement to insert data in non consecutive primary key id
January 02, 2022 02:54PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.