I need to update every second or third row in a table. There is very little to differentiate particular rows, so manually updating them is not really an option. [sig][/sig]
Add an extra column (ID) with an identity starting at 1
Then you can do use the modulo function (%) to get every other row:
SELECT * FROM TABLE WHERE (ID % 2) = 0
[sig][/sig]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.