Introduction to JOINS - Exercise
In Task 2, I followed the code for Insert into Dept_manager_dup but the output displays the Error 1364 : Field Dept_no doesn't have a default value.
Can you please suggest what is wrong in my method that displays such an error.
2 answers ( 0 marked as helpful)
Hi Mohammad!
Thanks for reaching out.
Can you please share the CREATE statement query you've executed prior to the INSERT Statements you've shared? There it should be seen if a default value has been set and what it is.
Looking forward to your answer.
Kind regards,
Martin
Kind regards,
Martin
Hi Martin,
Apologies for my late reply.
Well, you are right that I didn't set the default value for dept_no but I set it later and it didn't work. Lemme send you the screenshot of my Create statement.
Can you kindly guide me why the default value needs to be set and how in that Create statement. I looked up to your example in the lesson and there wasn't any default value set by you??
What should be the default value here?
Awaiting your response.
Regards,
BURAIR