Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: a select within a count ??
Andre wrote:
> select count(*), count(select distinct My_id from Anytable where My_id
> < 1000) from Anytable;
>
> In other words I want to execute a subquery within a count-statement.
> Is it possible ???
What exactly are you trying to achieve? Mebbe if you state the problem instead of what you think the solution, we can better assist you.
BTW, this should work and provide the exact same results as what you're looking for:
In-line views. Cartesian join.
select * from
(select count(*) from user_objects),
(select count(distinct object_type) from user_objects where rownum < 10);
-- BillyReceived on Tue Jul 01 2003 - 05:25:26 CDT
![]() |
![]() |