set serveroutput on;declare cursor cu is
select tname テーブル from tab where tabtype = 'TABLE' order by tname;
recct number;begin for cu_rec in cu loop
execute immediate 'select count(*) from ' || cu_rec.tal into recct;
dbms_output.put_line(
rpad(cu_rec.tal, 40) || ' ' ||
to_char(recct, '999,999,999')
);
end loop;
dbms_output.put_line('=====================================================');end;
/
真的不明白,不用也不可以么??
select tname テーブル from tab where tabtype = 'TABLE' order by tname;
recct number;begin for cu_rec in cu loop
execute immediate 'select count(*) from ' || cu_rec.tal into recct;
dbms_output.put_line(
rpad(cu_rec.tal, 40) || ' ' ||
to_char(recct, '999,999,999')
);
end loop;
dbms_output.put_line('=====================================================');end;
/
真的不明白,不用也不可以么??
解决方案 »
- oralcle 登录时报错:ora-01033 oracle initialization or shutdown in progress
- oracle 存储过程 中返回记录集判断有无记录集如何处理
- sever 2003无法安装ORACLE 8i--急~~!
- oracle 全文检索问题咨询!
- 这条SQL语句该怎么写?
- 有没有办法,把Oracle的存储过程,同步到SVN之类的版本工具上?
- clob和blob的问题
- 关于host的使用方法
- 为何服务中没有Oracle management server服务?
- 再问:如何实时监测其他用户的行为?
- ORACLE写脚本实现数据大批量更新
- linux下备份数据库的问题(在线等)
必须用execute immediate了
你给写过可以的看看先。