Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Maximun number of unions in a single query
Andreas Sheriff wrote:
> Does anyone know the maximum number of unions you can use in a SQL query?
>
> For example:
>
> select 1 from dual union all
> select 2 from dual union all
> select 3 from dual union all
> ...
> select [x-2] from dual union all
> select [x-1] from dual union all
> select [x] from dual;
>
> What is the upper limit of x?
>
> --
> Andreas
> Oracle Certified DBA and PL/SQL Developer
>
> "If you don't eat your meat, you cannot have any pudding.
> "How can you have any pudding if you don't eat your meat?!?!"
> ---
>
> WARNING:
> DO NOT REPLY TO THIS EMAIL
> Reply to me only on this newsgroup
I believe it's not a limit of 'x' so much as a limit of how many characters one can put in a sql ststement, which, according to the documentation is 64K. Of course you could always experiment and share your results.
David Fitzjarrell Received on Mon Jun 06 2005 - 17:09:40 CDT