exp 导出命令中tables表

一个库中有上千张表,欲导出其中几个表之外的所有表。貌似exp没这命令。那就写tables了,但是太多了,只能查user_tables;并多行合并。

写一个函数。

create or replace function col2row return clob is
  text clob := '(';
  name varchar2(32);
  CURSOR cur IS
    select table_name from user_tables;
begin
  open cur;
  fetch cur
    into name;
  while cur%found loop
    text := text || name || ',';
    fetch cur
      into name;
  end loop;
  return text;
end col2row;

 

select col2row() from dual;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11813230/viewspace-625796/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11813230/viewspace-625796/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值