How to only update the nth record

1 post / 0 new
allan.wax
allan.wax's picture
Offline
Last seen: 55 min 15 sec ago
Joined: Jun 14 2014
Junior Boarder

Posts: 12

Allan Wax
How to only update the nth record

I have a very large table that is ordered.  since I know the ordering, I want to create an UPDATE statement to only update the nth records.  Something like:

 

UPDATE table set state = <value> where MOD(ROW_NUMBER(),24) = 0;

 

Is there some syntax that allows this?  Note that this is not a SELECT but an UPDATE.