sql排序倒序怎么写?
sql中排序倒序使用desc关键字,一般需要和order by 合用,示例sql语句如下:例如:select * from student order by age desc;
意思是查询学生表,以学生年纪倒序排列。
排序采用 order by 子句,order by 后面跟上排序字段,排序字段可以放多个,多个采用逗号间隔,order by默认采用升序(asc),如果存在 where 子句,那么 order by 必须放到where 语句后面。
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有