oracle多表视图怎么添加数据
发布网友
发布时间:2022-04-09 02:32
我来回答
共4个回答
懂视网
时间:2022-04-09 06:53
版权声明:本文为博主原创文章,未经博主允许不得转载。
create or replace view oes_material_series_ref as
select t.productgroup, o.idnrk materialcode, t.seriescode
from oes_park_priority t
inner join oms_hm_mtl_general_view v
on t.materialcode = v.material_code
left join oms_modelbom_noderela o
on t.materialcode = o.matnr
where 1 = 1
and v.primary_uom = ‘TAO‘
group by t.productgroup, t.materialcode, o.idnrk, t.seriescode
union
select t.productgroup, t.materialcode, t.seriescode
from oes_park_priority t
inner join oms_hm_mtl_general_view v
on t.materialcode = v.material_code
group by t.productgroup, t.materialcode, t.seriescode;
comment on column OES_MATERIAL_SERIES_REF.PRODUCTGROUP is ‘产品组‘;
comment on column OES_MATERIAL_SERIES_REF.MATERIALCODE is ‘物料号‘;
comment on column OES_MATERIAL_SERIES_REF.SERIESCODE is ‘系列‘;
ORACLE视图添加备注
标签:
热心网友
时间:2022-04-09 04:01
oracle视图创建/oracle多表创建视图问题
create or replace view emp_dept_ve
(empno,ename,job,hiredate,sal,dname,loc) AS
select e.empno,e.ename,e.job,e.hiredate,e.sal, d.dname,d.loc
from emp e
left join dept d on d.deptno = e.deptno
;
-- emp_dept_ve 是给视图取的视图名
第二种方法
create or replace view emp_dept_ve as
select e.empno,e.ename,e.job,e.hiredate,e.sal, d.dname,d.loc
from emp e
left join dept d on d.deptno = e.deptno;
热心网友
时间:2022-04-09 05:19
可以通过触发器来代替直接往视图直接插入数据,当要往视图中插入数据的时候,直接向对应的表中插入相应的数据
热心网友
时间:2022-04-09 06:54
你往视图相关的表里插入数据就行了