Last answered:

10 Nov 2023

Posted on:

10 Nov 2023

0

should i also provide default value to other too

it keep showing error telling to provide default value to customer_id column which already has auto_increment

1 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Nov 2023

0

Hi Naman!
Thanks for reaching out.


Error 1364 in MySQL typically indicates that a field doesn't have a default value. Even if your `customer_id` column is set to `AUTO_INCREMENT`, the error suggests that another column is causing the issue, which requires a default value and doesn't have one. Check your table schema for any other columns that might not have default values set and are not nullable, and either provide a default value for those columns or alter your table schema to allow `NULL` values or set a default.


Hope this helps.
Best,
Tsvetelin

Submit an answer