Couldn’t get it, and found this accepted answer in one SO question
which says
If you set a column to be
varchar(15)
the maximum bytes allowed is 15. Thus you can’t pass it more than 15 characters without modifying the column to support more than 15.
So how exactly the second name is going to be inserted? IGNORE statements only ignore errors in cases:
- When we will try to insert a duplicate key where the column of a table has a PRIMARY or UNIQUE KEY constraint.
- When we will try to add a NULL value where the column of a table has a NOT NULL constraint.
- When we will try to insert a record to a partitioned table where the entered values do not match the format of listed partitions.
The question here seems to be not applicable to one of them, maybe the 3rd point is our case, not sure - but then it should just ignore the error, not ignore the varchar limitation, or what else?
Thanks!
Course: https://www.educative.io/collection/5352985413550080/6335716377231360
Lesson: https://www.educative.io/collection/page/5352985413550080/6335716377231360/5238030269939712