create or replace function f (tab dbms_tf.table_t) return varchar2 sql_macro as
begin
return 'select * from tab
join ( select level rn from dual connect by level <= 2 ) on c1 = rn';
end f;
Function created.
create table t1 (c1 int)
Table created.
create table t2 (c1 int)
Table created.
insert into t1 values ( 1 )
1 row(s) inserted.
insert into t2 values ( 2 )
1 row(s) inserted.
select * from f (t1)
C1 | RN | 1 | 1 |
---|
select * from f (t2)
C1 | RN | 2 | 2 |
---|