(1054)Unknown column in 'field list' - Mys

2020-07-30 04:05发布

问题:

I'm try to update some coloumn's cell in mysql.

when i execute this , value as number:

update tablename set contents=1 where contensid=218;

it is working.

but i execute value as a character:

update tablename set contents=text where contensid=218;

Please try again later or contact an Administrator. (1054)Unknown column 'text' in 'field list'

what i have to do update value as character ??

回答1:

If you don't put your "text" inside '', query thinks it is a column in your table. So do this:

update tablename set contents='text' where contensid=218;


回答2:

Maybe your column is wrong,You will need check the column,and again comit.



标签: mysql field