In any case, it may be worth noting that the manual says correlated subqueries "are inefficient and likely to be slow. Rewriting the query as a join might improve performance." <http://www.mysql.com/doc/en/Correlated_subqueries.html>.
SELECT person.pid, count(*) AS C FROM person, phone WHERE person.pid=phone.pid GROUP BY person.pid;
+------+---+ | pid | C | +------+---+ | 1 | 2 | | 2 | 1 | +------+---+ 2 rows in set (0.00 sec)
Michael
Miguel Angel Solorzano wrote:
At 13:59 27/3/2004, Ed Smith wrote: Hi,
Below the results from a server built with BK 4.1 tree 3 days ago:
<Correct results snipped> >
Miguel Angel Solórzano <[EMAIL PROTECTED]> São Paulo - Brazil
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]