Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: An Interesting Question ....
Hi,
something like this should work:
select dept.deptno
, dept.deptname
from dept
where dept.deptno = :deptno
union all
select dept.deptno
, dept.deptname
from dept
where dept.deptno = '010'
and not exists (select null
from dept d2 where d2.deptno = :deptno )
Rgds
Steinar Heggelund
My postings represent my opinions and they may be wrong. Received on Tue Sep 09 1997 - 00:00:00 CDT