* Oliver Hirschi <[EMAIL PROTECTED]> [09/13/04]:
> Hi people
> 
> Due to MySQL does not support "inner-selects", I generate a string (I
> programm java-client) with the values I used in an IN-operator for an
> update onto a mySQL database.
> 
> The statement looks like this:
> UPDATE layer SET State=1
> WHERE fpObjectID IN (1,3,4,5,20,34,56,24,56,11,45)
> 
> Now, the question came up if there is a maximum of values or length in
> an IN operator which can used on mySQL?
> 
> Does anybody know something about that?

The MySQL version 4.1.x now support sub-queries, if that is what you
mean by 'inner-selects', so you could also select the values used for
IN.

... WHERE fpObjectID IN (SELECT id FROM id_table WHERE ...)

I don't think the number of values is limited, at least using a
sub-query, however I don't know for sure.

David

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to