Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> how can i find the result?
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
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
![]() |
![]() |