Du kan använda en taltabell (eller master..spt_values).
declare @MinNo int
declare @MaxNo int
declare @IncrementStep int
set @MinNo = 2500
set @MaxNo = 2700
set @IncrementStep = 10
select @MinNo + Number * @IncrementStep
from master..spt_values
where type = 'P' and
number between 0 and (@MaxNo - @MinNo) / @IncrementStep
Eller en rekursiv CTE
;with C as
(
select @MinNo as Num
union all
select Num + @IncrementStep
from C
where Num < @MaxNo
)
select Num
from C