Chinaunix首页 | 论坛 | 博客
  • 博客访问: 930049
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类:

2008-12-11 18:54:45

declare

  sql1 varchar2(2000);

begin

  for v in (select a.table_name,a.comments  from dba_tab_comments a where a.owner='GAU01E')

  loop

      sql1:='comment on table '||v.table_name||' is '||''''||v.comments||'''';

      begin

       execute immediate sql1;

      exception

              when others then

                   null;

      end;

  end loop;

 

  for c in(select table_name,column_name,comments from dba_col_comments b where b.owner='GAU01E')

  loop

      sql1 := 'comment on column '||c.table_name||'.'||c.column_name||'  is '''||c.comments||'''';

      begin

           execute immediate sql1;

      exception

              when others then

                   null;

      end;

  end loop;

 

end;

阅读(514) | 评论(0) | 转发(0) |
0

上一篇:~/.bash_profile

下一篇:alter tablespace 表空间

给主人留下些什么吧!~~