Nishant Hooda Nishant Hooda - 1 year ago 55
MySQL Question

Error 1064 while inserting values

create table Eaddress (
employeeid varchar(10),
building varchar(10),
street varchar(10),
city char(10),
district varchar(10),
state char(10),
phoneno int(10),
primary key(employeeid)

insert into Eaddress('P0001','N21','Avenue 12','NYC','D21','New York',6965269);

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''P0001','N21','Avenue 12','NYC','D21','New York',6965269)' at line 1

I am puzzled by this error. I Tried changing the values and altering the data types of columns but nothing worked.

Answer Source

Try using this sintax

insert into Eaddress 
values ('P0001','N21','Avenue 12','NYC','D21','New York', 6965269);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download