I need to store the stored procedure results in a temp table. But the stored procedure result may be any table in any columns ordering.
Is there a general table (with not specified columns) that we can insert any table into it? I know I can use a function but is it possible using a stored procedure?
This is the code:
begin transaction
create table temp_table as
exec my_store_proc 1,111
select * from temp_table
drop table temp_table
commit transaction
in the code above, my_store_proc
result is a table with 6 columns (for example)