问题1:你想在where子句中使用别名,怎么办呢?
常见错误:[这样是不对得,我也希望这样行,呵呵]
select sal as salary, comm as commission
from emp
where salary < 5000
答案:
select *
from (select sal as salary,comm as commission from emp) x
where salary < 5000
问题1:你想在where子句中使用别名,怎么办呢?
常见错误:[这样是不对得,我也希望这样行,呵呵]
select sal as salary, comm as commission
from emp
where salary < 5000
答案:
select *
from (select sal as salary,comm as commission from emp) x
where salary < 5000