-1
INSERT INTO sampledata (name, email, pasword)
VALUES (tony, tonymail, 123pass);

above is the query I am writing to store some data inside my table which has column as following

id AUTO_INCREMENT, 
name varchar(50),
email varchar(50),
password varchar(50);

BUT I AM GETTING ERROR ~

Unknown column 'tony' in 'field list

O. Jones
  • 103,626
  • 17
  • 118
  • 172
zakir
  • 15
  • 4

1 Answers1

0

If this is MySQL, you are supposed to put the VALUES in quotation.

So what you should be writing is

INSERT INTO sampledata (name, email, password) VALUES ("tony", "tonymail", "123pass");