MySQL error #1054 - Unknown column in 'Field List'

前端 未结 2 1895
感情败类
感情败类 2021-02-05 12:31

Whenever I try to input data into my tblorder I get the error message #1054 - Unknown column \'FK_Customer_ID\' in \'field list\'. I have tried breaking my code down and in doi

相关标签:
2条回答
  • 2021-02-05 12:59

    You have an error in your OrderQuantity column. It is named "OrderQuantity" in the INSERT statement and "OrderQantity" in the table definition.

    Also, I don't think you can use NOW() as default value in OrderDate. Try to use the following:

     OrderDate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
    

    Example Fiddle

    0 讨论(0)
  • 2021-02-05 13:04

    I had this error aswell.

    I am working in mysql workbench. When giving the values they have to be inside "". That solved it for me.

    0 讨论(0)
提交回复
热议问题