[prog] MySQL & 'IN'

Karine Proot kproot at nerim.net
Sun Jul 18 07:36:42 EST 2004


On Sat, 2004-07-17 at 23:05, "Dominik Schramm" wrote: 
> It's supported from version 4.1.
> http://dev.mysql.com/doc/mysql/en/Subqueries.html
Thanks dominik, we weren't looking in the right part of the doc.

Indeed, that's also what I found out (bad me, asking questions before
searching a bit more...)

On Sat, 2004-07-17 at 22:39, Terri Oda wrote:
> So you'd have to try 4.1 (now at 4.1.3 beta) or another database 
> (postgres can do it, I believe) if you want to use subqueries.  Or do 
> multiple queries in mysql to do the same thing (views are the preferred 
> way, if I recall correctly).
Moving to 4.1 is not yet an option (it's my home server and we tend to
keep versions as they are, until we re-install it all - and 4.1 is not
in slackware 10 so it's a no!)

About views, the doc is quite clear :
Views currently are being implemented, and will shortly appear in the
5.0 version of MySQL Server.
Won't be there before sub-selects!

Anyway the doc also provide a solution (use temporary table) which works
fine and goes much faster that what I was trying to do (put results of
the sub-select in an array and then loop on it for the second query...)

I'm happy mysql is moving forward, I like it much. I can play with newer
version on my own box, which will help me wait to have it on the server
:)

Thanks Terri & dominik,
Karine



More information about the Programming mailing list