Anda dapat menggunakan tabel angka (atau 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
Atau CTE rekursif
;with C as
(
select @MinNo as Num
union all
select Num + @IncrementStep
from C
where Num < @MaxNo
)
select Num
from C