如何解决以物化视图直接格式添加注释
晚上好,
我想知道是否可以将注释直接放在物化视图定义的列中
(例如:comment '(1)xxxxxxx'--error)或者是否应该始终与以下方式分开
(例如:(2)对 test33.o_rowid 列的评论是“是我的视图列评论”)
我在表格的情况下看到了,如果可以直接发表评论。
非常感谢,
create MATERIALIZED view prueba34
as
select
o.rowid o_rowid comment '(1)xxxxxxx',-- Error,c.rowid c_rowid,e.rowid e_rowid,f.rowid f_rowid,nvl(o.estado ||'-'||c.vdescricion,'') as ddesc,o.segmento ||'-'|| e.vdescricion as Clase,f.vdescricion as v2descripcion
from detalle_ordenes o,tabla_hija c,tabla_hija e,tabla_hija f
where
( o.estado=c.vvalor(+) and c.tipo_filtro=1 )
and
( o.segmento=e.vvalor(+) and e.tipo_filtro=2)
and
( o.column1=f.vvalor(+) and f.tipo_filtro=3)
(2)comment on column prueba33.o_rowid is 'is my view column comment';
解决方法
很遗憾没有,我不确定您所说的“如果可以直接发表评论,我在表格中看到了”是什么意思?
据我所知,注释总是一个单独的命令,即:
comment on table XXX is '....';
comment on column XXX.YYY is '....';
,
您可以在物化视图的查询定义中添加注释:
CREATE TABLE detalle_ordenes (
col1 NUMBER
);
CREATE MATERIALIZED VIEW prueba34
AS
SELECT o.rowid AS o_rowid -- example comment in the mview
FROM detalle_ordenes o;
它们将存储在数据库中,并在 USER_MVIEWS 的列查询中可见。
除此之外,您可以像您和康纳所描述的那样,以通常的方式向容器表添加注释,使用 COMMENT ON ...
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。