10′000 columns in a query

You cannot have more than 1000 columns in a view, but what about a query?

I tried

select 1,2,3,4,....,10000 from dual;

it seems to work fine. However, when increasing, I am facing various errors :

select 1,2,3,4,....,17000 from dual;

*
ERROR at line 1:
ORA-00600: internal error code, arguments: [15201], 
[], [], [], [], [], [], []

or even

select 1,2,3,4,....,50000 from dual;

*
ERROR at line 1:
ORA-03113: end-of-file on communication channel

Put your code in <code> and </code> tags

6 Responses to “10′000 columns in a query”

  1. Tim Hall Says:

    If I saw a query with 10,000 columns in it, I would calmly make my way to the nearest emergency exit, whilst avoiding any eye contact. I would then proceed home and never return to that site. :)

    heers

    Tim…

  2. Vidya Says:

    Laurent:
    1000 columns in a view - what about a mview is it the same?

  3. Satish Kandi Says:

    How did you execute that query?

    I tried from sqlplus and received SP2-0027: Input is too long (> 2499 characters) - line ignored.

    Toad hangs after 2000 columns.

  4. laurentschneider Says:

    yes, but you have to do it on more than one line

    select 1,
    2,
    3,
    ….
    ,10000 from dual;

  5. laurentschneider Says:

    
    

  6. Satish Kandi Says:

    Ah… Thanks.. thats really being dumb on my part.

Leave a Reply

Use <code> and </code> to post code