Hi all
A quick one will this be OK to update vclass where vclass is NOT 1?
Thanks just learning sql
UPDATE vehicle_type
SET cylinders_id = 4
WHERE vclass == 1 and cylinders <= 1499
Hi all
A quick one will this be OK to update vclass where vclass is NOT 1?
Thanks just learning sql
UPDATE vehicle_type
SET cylinders_id = 4
WHERE vclass == 1 and cylinders <= 1499
I get an sql error near “1” when updating any row that has cylinders of less than or equal to 1499 What is the catch please? Thanks
UPDATE vehicle_type
SET cylinders_id = 4
WHERE vclass IS NOT 1 and cylinders <= 1499
UPDATE
vehicle_type
SET
cylinders_id = 4
WHERE
vclass != 1
AND
cylinders <= 1499
Thanks!
suggest <> (standard hence portable) not != (mysql proprietary)
I did look at the forum this thread is in before I posted my reply and decided it was safe to go with !=, but indeed, using <> as a general rule is better :tup:
Thanks