user_tab_comments的定义: create or replace view user_tab_comments (table_name, table_type, comments) as select o.name, decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER', 4, 'VIEW', 5, 'SYNONYM', 'UNDEFINED'), c.comment$ from sys.obj$ o, sys.com$ c where o.owner# = userenv('SCHEMAID') and (o.type# in (4) /* view */ or (o.type# = 2 /* tables, excluding iot - overflow and nested tables */ and not exists (select null from sys.tab$ t where t.obj# = o.obj# and (bitand(t.property, 512) = 512 or bitand(t.property, 8192) = 8192)))) and o.obj# = c.obj#(+) and c.col#(+) is null所以用sys登陆修改sys.com$表可以实现你要求的功能吧.
create or replace view user_tab_comments
(table_name, table_type, comments)
as
select o.name,
decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
4, 'VIEW', 5, 'SYNONYM', 'UNDEFINED'),
c.comment$
from sys.obj$ o, sys.com$ c
where o.owner# = userenv('SCHEMAID')
and (o.type# in (4) /* view */
or
(o.type# = 2 /* tables, excluding iot - overflow and nested tables */
and
not exists (select null
from sys.tab$ t
where t.obj# = o.obj#
and (bitand(t.property, 512) = 512 or
bitand(t.property, 8192) = 8192))))
and o.obj# = c.obj#(+)
and c.col#(+) is null所以用sys登陆修改sys.com$表可以实现你要求的功能吧.