zoukankan      html  css  js  c++  java
  • oracle-获取数据库中所有表的注释 comments

    公司dba提供的脚本:

    set serveroutput on
    set linesize  1000
    set feedback off
    set long 9999999
    set pagesize 0
    spool /tmp/getcomments.out
    select 'comment on table ' || table_name || ' is ' || '''' || comments ||
           ''';'
      from user_tab_comments
     where comments is not null;
    
    select 'comment on column ' || table_name || '.' || column_name || ' is ' || '''' ||
           comments || ''';'
      from user_col_comments;
    spool off;
    添加表注释:
    
    COMMENT ON table t1 IS '个人信息';
    
    添加字段注释:
    comment on column t1.id  is 'id';
    comment on column t1.nameis '姓名';
    comment on column t1.age is '年龄';
    ----------- 赠人玫瑰,手有余香     如果本文对您有所帮助,动动手指扫一扫哟   么么哒 -----------


    未经作者 https://www.cnblogs.com/xin1006/ 梦相随1006 同意,不得擅自转载本文,否则后果自负
  • 相关阅读:
    20140830 函数 递归
    函数 20140829
    结构体20140827
    20140826 集合
    20140822数组,应用举例
    140821 字符串,数字,日期及应用举例
    20140819 例子
    HTML基础
    登陆远程服务器
    索引 视图 游标
  • 原文地址:https://www.cnblogs.com/xin1006/p/3954065.html
Copyright © 2011-2022 走看看