My table has 81,225 rows. I am trying to select every 285th row:
Select *
From Test A
Where ROWID > 0 AND ROWID <= 81225
AND ROWID % 285 = 285 % 285
This query returns 285 rows as expected, but not the correct ones. What needs to be changed?
The condition you are using for the modulus is wrong. Use this instead:
Select *
From Test A
Where ROWID > 0 AND ROWID <= 81225
AND ROWID % 285 = 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With