oracle - How is it possible to insert and select inserted data in one SQL query? -


i have function insert_info(num in number) clears temp table's content , rewrites in data , adds amount of columns equal num arguments list. need call function , retrieve values temp table in 1 sql query, like:

select insert_info(5), t.* dual, temp t 

however, old values table , after table content updated. i'm using oracle 10g.

you this:

create or replace function show_table_data(p_info in number) return temp%rowtype   cursor c_temp     select       *           temp;    p_table c_temp%rowtype;   p_status varchar2(4000) := insert_info(p_info); -- not sure function returns; begin   open c_temp;   fetch c_temp     p_table;   close p_table;    return p_table; end;  select show_table_data(5) dual; 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -