我想知道是否可以将注释直接放在物化视图定义的列中。
(例如:注释‘(1)xxxxxxx’
(例:(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';
发布于 2021-04-06 03:20:35
不幸的是,我不知道你所说的“我在表格中看到了,如果可以直接发表评论”是什么意思?
据我所知,评论总是一个单独的命令,即:
comment on table XXX is '....';
comment on column XXX.YYY is '....';
发布于 2021-04-06 06:24:29
可以将注释添加到物化视图的查询定义中:
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 ...
以通常的方式向容器表中添加注释,正如您和Connor所描述的那样。
https://stackoverflow.com/questions/66962043
复制相似问题