Oct-18-2022, 11:43 PM
For an empty table, as yet no data, set:
After that, the unique key column will continue to auto-increment each time you enter a new row of data, you don't need to put it in an INSERT query.
I did that just this morning, because I had to add 3 new students to my table, no need to mention the unique key column id:
Quote:ALTER TABLE allstudents21BE3 AUTO_INCREMENT = 0;
After that, the unique key column will continue to auto-increment each time you enter a new row of data, you don't need to put it in an INSERT query.
I did that just this morning, because I had to add 3 new students to my table, no need to mention the unique key column id:
Quote:INSERT INTOIf you delete rows, the AUTO_INCREMENT still stays at the last value, nothing changes, but that doesn't matter, the unique key column doesn't need to be continuous, it only needs to be unique! Best leave it alone.allstudents21BE
(studentnr
,name
,password
,max_attendance
,attendance
,has_been_inc
,attn_this_week
) VALUES (1825010344, '不知道', 0, 0, 0, 0, 0, 0)