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;
/
真的不明白,不用也不可以么??
解决方案 »
- MSSQL中set NOEXEC ON 或是set NOEXEC off 来检查sql语法错误,oracle有类似函数吗?
- error while loading shared libraries: libsqlora8-2.3.so.0
- Oracle Forms Developer Release 6i 能在XP上安装吗?
- :new的问题
- decode问题,请大家指教?
- 关于锁的问题
- 问个超菜问题,公司买的oracle9.2i是25用户的
- DATE可以作为字段名吗?
- 请问这样的逻辑,怎么用sql语句实现呢?先谢了
- 请教两个快照的问题,100分。1快照能建立成实时刷新吗?2怎么读取快照日志?
- ORACLE写脚本实现数据大批量更新
- linux下备份数据库的问题(在线等)
必须用execute immediate了
你给写过可以的看看先。