clear markdown compare help donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 462261 distinct fiddles created so far.

EXPLAIN PLAN FOR select value from ( ( select 'a' v1, 'b' v2 from dual ) unpivot ( value for value_type in (v1,v2) ) );
 hidden batch(es)


select plan_table_output from table(dbms_xplan.display('plan_table',null,'BASIC ROWS'));
PLAN_TABLE_OUTPUT
Plan hash value: 3882305214
-----------------------------------------
| Id | Operation | Name | Rows |
-----------------------------------------
| 0 | SELECT STATEMENT | | 2 |
| 1 | VIEW | | 2 |
| 2 | UNPIVOT | | |
| 3 | FAST DUAL | | 1 |
-----------------------------------------
 hidden batch(es)


EXPLAIN PLAN FOR select CASE WHEN uvp.flag = 1 THEN t.v1 WHEN uvp.flag = 2 THEN t.v2 ELSE NULL END value from ( select 'a' v1, 'b' v2 from dual ) t CROSS JOIN ( SELECT 1 flag from dual UNION ALL SELECT 2 flag from dual ) uvp;
 hidden batch(es)


select plan_table_output from table(dbms_xplan.display('plan_table',null,'BASIC ROWS'));
PLAN_TABLE_OUTPUT
Plan hash value: 2083928383
-----------------------------------------
| Id | Operation | Name | Rows |
-----------------------------------------
| 0 | SELECT STATEMENT | | 2 |
| 1 | NESTED LOOPS | | 2 |
| 2 | FAST DUAL | | 1 |
| 3 | VIEW | | 2 |
| 4 | UNION-ALL | | |
| 5 | FAST DUAL | | 1 |
| 6 | FAST DUAL | | 1 |
-----------------------------------------
 hidden batch(es)