create or replace function top_n (
num_rows number, tab dbms_tf.table_t
) return varchar2 sql_macro is
begin
return
'select * from top_n.tab
fetch first top_n.num_rows
rows only';
end;
/
select * from top_n(5,employees);
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment