CREATE TABLE emp_seq (seq INT);INSERT INTO emp_seq VALUES(0);UPDATE emp_seq SET seq = LAST_INSERT_ID(seq+1);SELECT LAST_INSERT_ID();