I have a stored procedure that inserts a row into a table with an autoincremented column.
It gives me a warning but succeeds if i simply put “” for the value of the autoincremented column. The way I get rid of the error currently is to specify which columns the insert values are for… “insert into app_table(app_id,name,…) values(…)” but the autoincremented column is the only one that isn’t inserted into. Is there a cleaner way to do this? Like specifying which columns not to insert values into?
I have a stored procedure that inserts a row into a table with an
Share
You’re probably getting this warning:
Instead of
""for the auto_increment column, useNULLand the warning will go away. The auto_increment value will get incremented correctly. No need to list out all of the columns in theinsertstatement (although many consider it a good practice).