沒有直接語句
select  *,bb=identity(int,1,1)  into #b from 表
select *  from #b  where bb  between 5  and 10