Do not auto-capture column list (oracle 11g)

This is the next question Move one row to many rows of Oracle

I want to be able to cancel an arbitrary query result.

To disable a table manually, I would do:

select value_type, value from (
 (
  -- query to be unpivoted
  -- EG: select col1, col2, col3, col4, col5 from table
 )
 unpivot
 (
  -- Line I would like to change
  value for value_type in (col1, col2, col3, col4, col5)
 )
);

This works for all queries that return 5 columns called col1, col2etc. Is there something I put in place value for value_type in (col1, col2, col3, col4, col5)that captures all the column names from the query / view / table selected in the first part?

+2
source share
1 answer

PL/SQL, SQL , execute immediate, .

+2

Source: https://habr.com/ru/post/1734606/


All Articles