A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
In certain circumstances, without AND, in a single statement:
select * from [dbo].[TestData] Where [ID] / 10 = @PINNum
Here @PINNum means the slot or page to be extracted (0 for ID between 1 and 9, 1 for ID between 10 and 19, etc.). It depends on unclear details and relies on some previous questions.