Friday, February 24, 2012

Getting every row that can be divided by 50

This is kinda hard to explain but what im trying to do is get every row where the PK can be divided by 50 evenly for example

PK
50
100
150
200
250
300
350
400
450

I didnt want to do a separate query for each of the rows in my program. Is there a way that sql can do this easily? I wold rater not use stored procedures.SELECT * FROM yourTable
where yourPK % 50 = 0

No comments:

Post a Comment