Saturday, August 18, 2012

write a function to return the count of rows in a table by passing table name as parameter......


create or replace function tab_count(p_table varchar2) return pls_integer
as
v_cnt pls_integer;
begin

execute immediate 'select count(1) from '||p_table into v_cnt;

return v_cnt;

end tab_count;
/

No comments:

Post a Comment