您的位置:首页 > 数据库 > Oracle

oracle 数据倒库 字段注释维护

2011-02-24 10:37 441 查看
在PLSQL中执行以下语句
连接数据库,执行

【维护字段注释】

select 'comment on column '||table_name||'.'||column_name||' is '''||comments||''';'  from user_col_comments 
【维护表注释】
select 'comment on table '||table_name||' is '''||comments||''';'  from user_tab_comments  where comments is not null
点EXPORT QUERYRESULT,把导出的结果,使用TSV方式保存。保存文件后缀改为TXT。如:c:/comment.txt (注分别导出)
打开另外一个数据库 登录sqlpluss
执行@ c:/comment.txt,即可把注释成功写入另一个库中。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息