Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't update int type column in mysql

Tags:

int

mysql

What is wrong with this mysql query?

UPDATE answers SET 23 = 2 WHERE user_id ='1';

I am trying to update an int(2) field, and this just isn't working.

23 is the name of the column by the way

like image 487
Mladen Avatar asked Oct 31 '25 14:10

Mladen


1 Answers

If 23 is your column name then escape it using `

UPDATE answers 
SET `23` = 2 
WHERE user_id ='1';
like image 132
juergen d Avatar answered Nov 05 '25 01:11

juergen d



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!