为什么数据库中的where语句不能写在order by前面

select top 3 "E".ename"姓名", "E".emp_sal"工资", "S".GRADE"等级", "D".dept_name"部门名字"
from emp"E"
join dept"D"
on "E".deptno = "D".deptno
join SAL"S"
on "E".emp_sal>=LOSAL and "E".emp_sal<=HISAL
where "E".ename not like '%K%' --这里为什么不能写在order by 后面
order BY "E".emp_sal desc

这是SQL的约定格式。从思维概念上讲: 先对数据及进行条件过滤筛选, 再对结果集合进行排序
温馨提示:答案为网友推荐,仅供参考
相似回答