There are n record in a table ABC
.
write a query to select every 5th record from the table.
for example there are 30 rows in a table. so query should output 5th,10th,15th,20th, 25th and 30th record from the table.
I tried ROW_NUMBER OVER (ORDER BY id )
but getting msg :-
Message from SQL server IML (msg 156, level 15, state 2):
Incorrect syntax near the keyword 'OVER'.
I am using Sybase database.