Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL question
This should work:
Select count(*) from mediatype_count where mcount = 5;
I did a
select count(*) from emp where 1=2 ( force a failure to find any)
and got
COUNT(*)
0
hth
A Kydd <akydd_at_gpu.srv.ualberta.ca> wrote:
>Alrighty, I have a view mediatype_count like so:
>
>(varchar2) (number)
>MEDIATYPE MCOUNT
>-------------------- ---------
>C++ code 1
>Java applet 1
>soya products 1
>unix binary 2
>
>Now say I want a count of the mediatypes which have an mcount of 5. There
>aren't any, so I want the query to return a value of 0. I've tried and
>tried, but I can only get the "no rows selected" result. It seems to
>me that I have gotten "0" results on similar queries before, but I'm on a
>different system now. Any help would be greatly appreciated.
>
>Thanks in advance,
Received on Fri Jul 14 2000 - 00:00:00 CDT
![]() |
![]() |