Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Very long "WHERE" list.
Andy Hassall apparently said,on my timestamp of 10/07/2004 10:40 PM:
>
> A quick test shows that MySQL 4.0.18 can.
>
> #!/usr/bin/perl
> my $monstroInlist = join ',', (1..20000);
> print <<END_SQL;
> select count(*)
> from t
> where id in ($monstroInlist);
> END_SQL
>
Mind creating a linear list with all the values as proposed by the OP? I think you will find that it will exceed the max SQL statement size. What if the list had the third element missing after every dozen?
-- Cheers Nuno Souto wizofoz2k_at_yahoo.com.au.nospamReceived on Sun Jul 11 2004 - 05:07:41 CDT