Hi!
I'm running this little SQL on 12c, also tried on 11g, and got an internal error on both. I couldn't understand why. Probably a bug, as noted by people in stackoverflow, where I originally asked about:
https://stackoverflow.com/questions/53527981/why-this-sql-causes-an-internal-error-in-oracle select
sysdate c1,
sysdate c2,
row_number() over(order by sysdate, sysdate desc) c3
from dual
order by c3
It works if I remove the desc keyword from the row_number(). But I can keep the desc and remove any of the columns c1 e c2 and it also works. Still, I can remove the order by c3 or set it do desc and again it will work. Couldn't get why it doesn't works as is.
Thanks.
ORA-00600 is a bug, simple as that. Think of it like a core dump in your application - we went down a code path we were not meant to.
SQL> select
2 sysdate c1,
3 sysdate c2,
4 row_number() over(order by sysdate, sysdate desc) c3
5 from dual
6 order by c3;
row_number() over(order by sysdate, sysdate desc) c3
*
ERROR at line 4:
ORA-00600: internal error code, arguments: [15851], [3], [2], [1], [1], [], [], [], [], [], [], []
There's a number of bug references on support.oracle.com for 15851. So there might already be a patch - you'd need to log a call with Support to progress this.