Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#1054 - Unknown column

I am using MySQL 5.5 and phpmyadmin 3.5.2 (provided by http://www.freewebhostingarea.com)

My sql query is:

INSERT INTO `example`(`id`, `name`, `password`) VALUES (1,we,5)

where id is int type, name and password are varchar.

but when ever inserting any value other than integer in name and age,it displays #1054 error, i.e

#1054 - Unknown column 'we' in 'field list'
like image 583
Zain Ali Avatar asked Apr 09 '26 13:04

Zain Ali


1 Answers

You must surround any strings with quotes.

INSERT INTO `example`(`id`, `name`, `password`) 
VALUES               (1,'User Name','Password123')
like image 90
Blaise Swanwick Avatar answered Apr 16 '26 07:04

Blaise Swanwick