一、如果你要查询出前10条(就10条)
1(降序)
select top 10 * from yourtable order by id desc
2(升序)
select * from(
select top 10 * from yourtable order by id desc) a order by id
二、如果你要查询出前10条(可以等值,就是允许 “>=第11条 后的值与第10条相等”的情况)
1(降序)
select top 10 * with ties from yourtable order by id desc
2(升序)
select * from(
select top 10 * with ties from yourtable order by id desc) a order by id