Last answered:

28 Dec 2023

Posted on:

03 Dec 2023

0

LEFT JOIN - Part I error

Following the instructions of this lecture, I keep getting the following error (the last 2 errors in the snip) when I try to "add back the initial records".

How do I correct this?

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

06 Dec 2023

0

Hi Romeo!
Thanks for reaching out.


Error 1406  

In MySQL this error message occurs when data being inserted or updated in a column exceeds the column's maximum length. For instance, trying to insert a string of 20 characters into a VARCHAR(10) field triggers this error.

Error 1062

In MySQL this error message happens when you attempt to add a duplicate entry in a column that has a UNIQUE constraint or is a PRIMARY KEY. This error indicates a violation of the database's uniqueness rules, such as inserting a record with an already existing unique identifier.


Hope this helps.
Best,
Tsvetelin

Posted on:

23 Dec 2023

0

Hi Tsvetelin,

Your explanation has helped clarify some of my concerns.

My more significant concern is being confused after following the instructions and coming up with that error, even though I did not alter the table from its original form.

Instructor
Posted on:

28 Dec 2023

0

Hi Romeo and Tsvetelin!

I hope you don't mind if I join the conversation.

@Romeo: Can you please share here (copy and paste or provide a clear screenshot) containing the relevant create table statement as well as a screenshot containing the entire data stored in "departments" prior to adding back data? This will help us assist you better.

Looking forward to your answer.
Best,
Martin,
The 365 Team

Submit an answer