Last answered:

04 Apr 2022

Posted on:

03 Apr 2022

0

Error Code:1054 regarding exercise 1's solution

Hi,

While running this query which was given as a solution, there is an Error Code:1054 Unknown column 'from_date' in 'NEW'.

I would love to hear from you why this is happening and what can be done to fix this issue.

Thanks!

image.png

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

04 Apr 2022

0

Hi Yongjun!

Thanks for reaching out.

This situation is a good example that as we use the name employees in our code we must be careful about whether we are referring to the database or the table. In this case, we are referring to the table, and in that table, there is no column named from_date.
For instance, you can execute the following query to see what data is contained in the employees table:

SELECT 
    *
FROM 
    employees
LIMIT 10;

Hope this helps.
Best,
Martin

Submit an answer