Hi all
I have a mysql table called vehicle_type and it has a column called cylinder_id
The value in cylinder_id is a number that is defined by the value in the column cylinders.
I want to update all the values in cylinder_id to 1 where the value in cylinders is between 0-99
This is my attempt- what am I doing wrong? Thank you
UPDATE CYLINDER_ID '1'
VEHICLE_TYPE WHERE
CYLINDERS 0>99
Thank you Rudy! I am now updating cylinder_id when it is 3 when the vclass is 1 and the cylinders are 200 or more. Does this code look correct? Thank you
UPDATE vehicle_type
SET cylinder_id = 3
WHERE vclass = 1 and cylinders >200
I get 3 as a result, I have done a new query with but it doesn’t affect any rows, I have checked that there are values in the database that are vclass 1 and have cylinders with value 200. They are not being updated and I don’t understand why - maybe I have to do change the cylinders to >199 so it will update those values?
UPDATE vehicle_type
SET cylinder_id = 3
WHERE vclass = 1 and cylinders >200