日期:2014-05-17 浏览次数:20855 次
create or replace function findLChild RETURN NUMBER AS
v_num number;
max_sp_recursion_depth VARCHAR2(20);
begin
select count(*) into v_num from tabs where table_name = 'tmp_table';
if v_num > 0 THEN
EXECUTE IMMEDIATE('create table tmp_table(id number)');
END IF;
max_sp_recursion_depth := 99 ;
-- 如果是调用存储过程直接写存储过程名称,不需要call关键字 iterative(iid, layer);
--select * from tmp_table;
select count(*) into v_num from tabs where table_name = 'tmp_table';
IF v_num < 0 THEN
EXECUTE IMMEDIATE('DROP tmp_table');
END IF;
end findLChild;