How to insert a row into a table with a single auto-increment column?

There is only one calld identifier in my table. This column is an auto-increment key (I use it for sequencing). I want to do something like: insert into sequencer;but it gives me SQL errors because I assume that I need to have a part values. But there are no other columns in the table, and I want the identifier column to be auto-incrementing. I would rather not hack this by simply adding another dummy column. Thanks.

+5
source share
1 answer
INSERT INTO table SET id = NULL;

or

INSERT INTO table VALUES (NULL);

When pasted NULLinto an auto-increment column, mysql generates a new number instead.

+8

All Articles