0

ERROR 1054 (42S22): Unknown column 'Firstname' in 'field list'

I'M gettin the above error when I enter:

mysql> insert into people (fname, lname)
    -> VALUES (Firstname, Lastname);

Here's the table:

mysql> desc people;
+-------------+-------------+------+-----+---------+-------+
| Field       | Type        | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| fname       | varchar(20) | YES  |     | NULL    |       |
| lname       | varchar(20) | YES  |     | NULL    |       |
| phonenumber | varchar(10) | YES  |     | NULL    |       |
| city        | varchar(20) | YES  |     | NULL    |       |
| state       | varchar(20) | YES  |     | NULL    |       |
| address     | varchar(30) | YES  |     | NULL    |       |
| zip         | varchar(5)  | YES  |     | NULL    |       |
+-------------+-------------+------+-----+---------+-------+

Any ideas?

Edited by pritaeas: Moved

3
Contributors
4
Replies
19
Views
4 Years
Discussion Span
Last Post by JorgeM
0

I'm more of an MSSQL person myself, but wouldnt you have to enclose the values in single quotes? In SQL, if you dont use the single quotes, SQL considers the value as a column name.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.