SQL中与top对应的语句是?

来源:百度知道 编辑:UC知道 时间:2024/05/16 00:50:44
SQL中与top对应的语句是?
对,我就是不知道倒序的怎么写。
select top 10 * from PE_Supply where SupplyType=1 倒序要怎么改呢

你是想显示从大到小的话就是
select top 10 * from PE_Supply where SupplyType=1 order by 想要降序的字段desc
从小到大的话就是
select top 10 * from PE_Supply where SupplyType=1 order by 想要升序的字段

可以倒序排列阿

顺序的top 10 是前10条
倒序的就是 后10条了

正序 select * from 表名 where 条件 order by 排序字段 asc
倒序 select * from 表名 where 条件 order by 排序字段 desc

select top 10 * from 表A order by 表A的字段 desc;

什么?不是top吗?