日期:2014-05-17 浏览次数:21196 次
create or replace procedure sp_test_wq(iv_table_name in varchar2,
iv_column_name in varchar2,iv_where in varchar2)
is
type t_cur is ref cursor;
cur t_cur;
vn_result number;
begin
open cur for 'select count(1)/sum(' || iv_column_name || ') from ' ||
iv_table_name || ' ' || iv_where;
fetch cur into vn_result;
dbms_output.put_line(vn_result);
end sp_test_wq;