Mysql insert null into auto_increment




















Report Error. Your message has been sent to W3Schools. W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.

It will also cache up to 10 values for performance. The cache option specifies how many sequence values will be stored in memory for faster access.

We just launched W3Schools videos. Get certified by completing a course today! If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:.

Thanks for the answer. I tested this and it definitely works but I chose the other answer because I find inserting a NULL into a column that ends up with a value a little conflicting. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Viewed k times. Alexis Tyler 1, 6 6 gold badges 29 29 silver badges 46 46 bronze badges. Salman Raza Salman Raza 1, 4 4 gold badges 15 15 silver badges 18 18 bronze badges. Add a comment. Active Oldest Votes. Set the auto increment field to NULL or 0 if you want it to be auto magically assigned Adrian Cornish Adrian Cornish This works for me unlike skipping autoincrement column value.

Celada Celada I gave values for only 23 columns but there are 24 columns in the table. I guess Adrian's suggestion would work too, but I didn't know you could do that! Celada great thing about this site - you learn something even when your own answer is correct :- — Adrian Cornish.

All thanks for your reply!



0コメント

  • 1000 / 1000