-1

I need help with a MySQL program, this is the code:

INSERT INTO CUSTOMER (Customerid, CustomerFname, CustomerLname, CustomerPhone, CustomerGender, CustomerYearly_salary, CustomerStreet, CustomerCity, CustomerState, CustomerPostcode, ProductId, PaymentId)

VALUES (12345678910,’Anna’, ’English’, 017362930115, ‘female’, 30000, ‘Augsburger_Str._84‘, ‘Senscheid’, ‘Rheinland-Pfalz’, 53520, 0101, 50000)

This is the error code:

INSERT INTO CUSTOMER (Customerid, CustomerFname, CustomerLname, CustomerPhone, CustomerGender, CustomerYearly_salary, CustomerStreet, CustomerCity, CustomerState, CustomerPostcode, ProductId, PaymentId) >VALUES (12345678910,’Anna’, ’English’, 017362930115, ‘female’, 30000, ‘Augsburger_Str._84‘, ‘Senscheid’, ‘Rheinland-Pfalz’, 53520, 0101, 50000)

Error Code: 1054. Unknown column '’Anna’' in 'field list'

nbk
  • 45,398
  • 8
  • 30
  • 47
Leliko
  • 1
  • 1
  • 3
    Does this answer your question? [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – Progman Jul 26 '21 at 17:36
  • I think you're using backticks for the string values? Backticks are used for referencing database objects. – Sam020 Jul 26 '21 at 17:38
  • It looks like you're using smart-quote characters, not ASCII single-quote characters, for the string literal. – Bill Karwin Jul 26 '21 at 17:47

1 Answers1

-1

SQL thinks that Anna (and other values in front) are Columns as per the error message, replace with quotation marks:

INSERT INTO CUSTOMER (Customerid, CustomerFname, CustomerLname, CustomerPhone, CustomerGender, CustomerYearly_salary, CustomerStreet, CustomerCity, CustomerState, CustomerPostcode, ProductId, PaymentId);

VALUES (12345678910, 'Anna', 'English', 017362930115, 'female', 30000, 'Augsburger_Str._84', 'Senscheid', 'Rheinland-Pfalz', 53520, 0101, 50000);
EKrol
  • 151
  • 9