You can also do it programatically.  I find, even with MySQL that this is 
faster since it avoids the NxM intermediate table creation where one can 
limit the number of rows intially. I'm using Debian so I'm stuck on .22 
for now, this might change in .23.  It would definitely be the way to go 
for you nested queries. 

On Tue, 7 Aug 2001, Grigory Bakunov 
wrote:

> Date: Tue, 7 Aug 2001 09:57:52 +0500
> From: Grigory Bakunov <[EMAIL PROTECTED]>
> To: Steven Robillard <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: Nested Queries in MySQl
> 
> Date |6 Aug 2001 19:59:46 -0700
> >From |Steven Robillard <[EMAIL PROTECTED]>
> 
> Hello!
> 
> SR> Hi all, I have not been using MySQL for too long but have been using SQL7.0 for 
>a while now, so I am generally familiar with the structure.  
> SR> My basic problem right now is trying to figure out how to get MySQL to do nested 
>queries such as ...
> SR> select count(*) from (select count(*) as A, group_col from my_table group by 
>group_col) as B
> SR> Could someone help me out with getting the nested query to work, (I know this 
>can be done here with a distinct but work with me here.)  Thanks in advance.
> 
> MySQL does'nt support nested queries now.
> You can try to play with JOIN syntax
> http://www.mysql.com/doc/J/O/JOIN.html
> 
> ___________________________________________________________________
>                                        Truly yours, Grigory Bakunov
>                                               ASPLinux Support Team
>                                              http://www.asplinux.ru
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to