這幾天做性能優化
有時候需要導出某用戶下的所有table
select * from user_tables;
select * from user_views;
select * from user_sequences;
select * from user_triggers;
想查找表的數據條數
試試這個
select t
如果沒有值
代碼
create or replace function count_rows(table_name in varchar
owner in varchar
return number
authid current_user
IS
num_rows number;
stmt varchar
begin
if owner is null then
stmt :=
else
stmt :=
end if;
execute immediate stmt into num_rows;
return num_rows;
end
再執行查詢
select table_name
From:http://tw.wingwit.com/Article/program/Oracle/201311/18185.html