Sie können eine Zahlentabelle (oder master..spt_values) verwenden.
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
Oder ein rekursiver CTE
;with C as
(
select @MinNo as Num
union all
select Num + @IncrementStep
from C
where Num < @MaxNo
)
select Num
from C