DROP TABLE IF EXISTS ids;
CREATE TABLE ids (
id int AUTO_INCREMENT PRIMARY KEY
) COMMENT='ENGINE "InnoDB"';
SELECT last_insert_id();
last_insert_id()
0
SELECT last_insert_id(10);
last_insert_id(10)
10
SELECT last_insert_id();
last_insert_id()
10
INSERT INTO ids VALUES();
SELECT last_insert_id();
last_insert_id()
1
SELECT * FROM ids;
id
1
DROP TABLE ids;
