On Tue, 2003-06-03 at 08:39, Phillip Hellewell wrote:
>       I'm planning to write a PHP/MySQL budget manager.  I seem to
> remember hearing something about MySQL's inability to do subselects.
> What exactly _is_ a subselect?  Is it like a join?

>From the MySQL changelog for version 4.1 (alpha):

Subqueries are now supported. Here is an example: 

        SELECT * FROM t1 WHERE t1.a=(SELECT t2.b FROM t2);
        SELECT * FROM t1 WHERE (1,2,3) IN (SELECT a,b,c FROM t2);
        
Derived tables (unnamed views) are now supported. Basically, a derived
table is a subquery in the FROM clause of a SELECT statement. Here is an
example: 

        SELECT t1.a FROM t1, (SELECT * FROM t2) t3 WHERE t1.a=t3.a;

I'm not sure why they're not supporting named views with this version. 
With their modular table design, and support for unnamed views, you'd
think named views would be fairly trivial.

What do I know, though... :)

Steve

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to