Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Return at least some info
Hi,
see NVL function.
Regards,
Roman Mirzaitov
Brainbench MVP for Oracle Administration
www.brainbench.com
"Jane O" <janeohin_at_aol.com> wrote in message
news:atss3o$2c8$2_at_reader1.panix.com...
> Using EMP as example with ONE EXTRA column - COMPANY - that has the SAME
> value
> "MSOFT"
> EMPNO NUMBER(4)
> ENAME VARCHAR2(10) Y
> JOB VARCHAR2(9) Y
> MGR NUMBER(4) Y
> HIREDATE DATE Y
> SAL NUMBER(7,2) Y
> COMM NUMBER(7,2) Y
> DEPTNO NUMBER(2) Y
> COMPANY VARCHAR2(10) Y
>
> How can I return this:
>
> COMPANY COUNT(*)
> ---------- ----------
> MSOFT 0
>
> with a query like :
>
> SQL> select max(company), count(*) from emp where job = 'ACTOR' ;
> ...when there is NO such job as "ACTOR" ?
> Thanks
>
>
Received on Thu Dec 19 2002 - 11:09:51 CST