在oracle中 查询员工信息,按照部门号升序且员工的工资降序排列 怎么搞?

select ename,sal,deptno from emp order by deptno,sal asc 哪里错了?
2025-03-23 16:59:36
推荐回答(5个)
回答1:

SELECT ename,sal,deptno FROM SCOTT.EMP ORDER BY deptno asc,sal desc
注:scott表明emp的用户

回答2:

没错,但是你的asc放与不放是一个效果

回答3:

select ename,sal,deptno from emp order by deptno,sal desc

我这个是对的,你试试吧

回答4:

select ename,sal,deptno from emp order by deptno asc,sal desc;

回答5:

1. 查询和ALLEN不在同一部门的员工的姓名和所在部门名称