|
Multiple row updates
Gidday
Just wondering how, using one query, to update a counter column with + 1 in multiple rows when the row ids are supplied.
So:
UPDATE table
SET col=col+1
WHERE id in (1,2,3)
This doesn't work. It does work if the value of col is static. Is it possible, or will I have to create a separate query for each row update?
Thanks for your help.
|