Reputation: 16851
I have a table called People
, when i describe People
i get the following output
| Name | varchar(50) | YES | | NULL |
My sql update statement :
update Person set Name='xxx' AND Age= '33' ;
The error :
ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'xxx'
Upvotes: 0
Views: 3774
Reputation: 856
Use below query
update People set Name='xxx' , Age= '33' where condition
;
Upvotes: 1
Reputation: 204766
depends on what you want to do. Setting age
and name
for all in your table do
update Person set Name='xxx', Age= '33'
or set name
for all with age=33
do
update Person set Name='xxx' WHERE Age= '33'
Upvotes: 2