我手动放置了架构,但是没有commission_pct列,我如何添加它?
我在任何地方都找不到commission_pct数据...
请帮助我:(
select employee_id as 사원번호,
first_name || ' ' || last_name as 사원명,
nvl( salary + (salary * commission_pct), salary)*12 as 연봉,
department_id as 부서번호
from employees
where department_id in(30,50,60) and
nvl( salary + (salary * commission_pct), salary)*12 >= 20000 and
nvl( salary + (salary * commission_pct), salary)*12 <= 60000
order by 부서번호, 연봉 desc;```
ORA-00904:“委员会_PCT”:000000-“%s:不存在无效标识符
1条答案
按热度按时间mwngjboj1#
这有点奇怪您应该如何处理不存在列?您确定您连接到了正确的模式并拥有所有应该拥有的表吗?
对于您的问题,您可以使用
alter table
向表中添加一个新列,具体方法如下:我的employees
表是一个虚拟表,它不代表你的表。要设置值,
update
表为