Reputation: 25
I have created a database called fruits within it I have created a table called fruits_info.
With headings of fruits_name VARCHAR(25), fruits_description VARCHAR(75), fruits_price FLOAT.
When I try and insert values to the table I use this function.
INSERT INTO fruits.fruits_info VALUES(`Peaches`, `Fresh peaches from Bengal`, `1.90`);
I then get this error message.
Error 1054 (42s22):Unknown column
peaches
infield list
Upvotes: 0
Views: 291
Reputation: 228
Use this
INSERT INTO fruits.fruits_info VALUES('Peaches', 'Fresh peaches from
Bengal', '1.90');
Upvotes: 0
Reputation: 7301
Instead of `
use '
.
INSERT INTO fruits.fruits_info VALUES('Peaches', 'Fresh peaches from Bengal', '1.90');
The backtick (`
) is for specifying a column.
The single quote ('
) is for a value.
Upvotes: 2