MySQL Error Code: 1054 Unknown column 'field' in 'field list'

15,159

The error was caused by a trigger which was doing a comparison on 'originalFieldName'. I had forgotten to specify it as new.originalFieldName to refer to the newly inserted value in that field and thus MySQL reported it as unknown column.

Share:
15,159
ken macharia
Author by

ken macharia

Updated on June 28, 2022

Comments

  • ken macharia
    ken macharia almost 2 years

    I keep getting

    Error Code: 1054 Unknown column 'originalFieldName' in 'field list'

    when trying to insert a new record to a table. This still happens even when I am not inserting any value to this problematic column 'originalFieldName'. Renaming the field and ensuring I don't have unprintable characters like suggested in solutions to this question does not help either.

    I have since reduced my query to INSERT INTO incoming(receiptDate) VALUES(NOW()); and deleted some fields to remain with below table: table description but this error 1054 keeps popping up