Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> how can i find the result?

how can i find the result?

From: Á¤¿µ¼® <illudus2_at_kornet.net>
Date: Fri, 15 Jun 2001 18:29:11 +0900
Message-ID: <9gckb3$1r6$1@imsinews.kornet.net>

Suppose, there is a table, abc, with columns, no(smallint) and name(varchar(10)).
and theer are records as follows,

no      name
==      =====
1        dfjdfdfd
2        dfefee
3        wuwu
5        mmmm
7        yyyy

In this situation, I would like to find out the missing numbers. So when I query, I want to get the result 4 and 6.

If i use the below query,

    select rownum from abc where rownum <= 5     MINUS
    select no from abc;

the result is
rownum



4

But I want to get the result 4 and 6 as a missing no. What was I wrong? How can I solve this problem?

Thanks in advance, Received on Fri Jun 15 2001 - 04:29:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US