Mysql -- inserting in table with only an auto incrementing column -


lets have table 1 column, id(which primary key)

how insert new row table without specifying id?

i tried this

insert (`id`) values (null) 

and doesn't work

edit: forgot mention id, primary key has auto_increment , not null attribute.

edit 2: exact error when running query above

column 'id' cannot null 

as 'id' auto-increment enable (assuming id integer), can do:

insert (id) values (null) 

and 'id' keep incrementing each time.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -