Jun 5th, 2007, 3:09 PM
|
#4
|
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 329
Rep Power: 3 
|
I think you would have to use the Group By clause, something similar to this:
select col1,count(*)
from table1 t1, table2 t2
where t1.id=t2.id and t1.name='john'
group by col1;
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
|
|
|
|