BETWEEN and

 


select * from (
select *,ROW_NUMBER() over (ORDER BY AddTime desc) RowNumber from Product
where ID not in (
select top 10 a.ID
from Product a left join ProductType b on a.ProductType=b.ID
where a.DeleteState=0 order by a.AddTime desc
) and DeleteState=0
) t
where t.RowNumber BETWEEN 0 and 2

你可能感兴趣的:(BETWEEN and)