PL/SQL (MOSC)

MOSC Banner

Is this expected behavior?

edited Jun 21, 2018 11:50AM in PL/SQL (MOSC) 2 commentsAnswered
 

select * from (select 1 a, 1 b from dual)

group by cube(a, b);

 

         A          B

---------- ----------

         1          1

         1          1

         1          1

         1          1

 

===

 

select * from (

  select 1 a, 1 b from dual

  union

  select 1 a, 1 b from dual -- where 1 = 0

)

group by cube(a, b);

 

 

         A          B

---------- ----------

 

                    1

         1

         1          1

 

 

create table t as select 1 a, 1 b from dual;

 

select * from t group by cube(a, b);

 

         A          B

---------- ----------

 

                    1

         1

         1          1

 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center