0

I am trying to insert a value(row) into my table users but it's giving error that column doesn't exist.

User table: users

insert into users (id,name,gender,city,age,company) 
values (1,omkar,"male","cuttack",24,"tcs");

I am getting column does not exists. And with some specific values I am getting hint don't know why. Error screenshot

Omkar666
  • 37
  • 6

2 Answers2

0

You must use single quotes for literal string values. Double quoting is interpreted as being an identifier, in this case a column name, which causes the error.

insert into users (id,name,gender,city,age,company) 
values (1,'omkar','male','cuttack',24,'tcs');
Kaushik Nayak
  • 30,772
  • 5
  • 32
  • 45
0

If you set "Id" is auto increase, you can try bellow

insert into users (name,gender,city,age,company) values ('omkar','male','cuttack',24,'tcs');
hoang phuc
  • 58
  • 5
  • single quotes worked id I haven't used for auto increment since it's just a dummy data which I was checking. – Omkar666 Apr 19 '19 at 07:10