英语翻译select * from a order by decode(a.xx,50,1,-1)desc

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 06:51:23
英语翻译select*fromaorderbydecode(a.xx,50,1,-1)desc英语翻译select*fromaorderbydecode(a.xx,50,1,-1)desc英语翻译se

英语翻译select * from a order by decode(a.xx,50,1,-1)desc
英语翻译
select * from a order by decode(a.xx,50,1,-1)desc

英语翻译select * from a order by decode(a.xx,50,1,-1)desc
decode(a.xx,50,1,-1)是判断a.xx是否等于50,如果等于50,该函数取值为1,否则取值为-1.根据此函数的值进行倒序排列后,会优先显示值为1(也就是a.xx==50)的记录.