| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT (SELECT.....) bugging me
don't forget the group by clause or it will bark at you
e.g.
select a.id,a.dob,count(*)
from persons a,appt b
where a.id = 10
and a.id = b.id
group by a.id,a.dob;
Timo Kulju wrote in message <7gp66m$pf_at_cs.joensuu.fi>...
>anneke_at_echelon.nl (Anneke Treep) writes:
>
>
>Hi!
>
>>SELECT id,
>> (SELECT count(*) FROM appt WHERE id = 10),
>> dob
>>FROM persons
>>WHERE id = 10;
>
>
>This should do the work:
>
>SELECT a.id, count(*), a.dob
>FROM persons a, appt b
>WHERE a.id = 10 AND b.id = 10;
>
>
>
>--
>TK
Received on Wed May 05 1999 - 09:34:48 CDT
![]() |
![]() |