2021-04-14
阅读量:
479
sql语句中别名怎么使用
问:select rownum rn,a.* from (select * from emp order by sal desc) a where rn<10
将where后面的rn改成rownum就能执行, 这是为什么?
答:与sql语句的执行顺序有关
先执行的where 后执行的select ,所以在select中的别名 where 获取不到






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论