user_tab_comments是数据字典啊?为什么要update?用system大概可以修改的吧

解决方案 »

  1.   

    我用system进去查询出来的结果我是我想更新的内容
      

  2.   

    我用system进去查询出来的结果我不是我想更新的内容
      

  3.   

    数据字典不可一修改得,因为数据字典都是oracle更加底层字典表合成得
      

  4.   

    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$表可以实现你要求的功能吧.