| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Query Question
Are you limited to SQL or can you use PL/SQL, also what do you want to do with the numbers (just output on screen, insert into another table, write into a file)?
A for loop in PL/SQL would do it nicely.
"Charcoal" <who_at_cares.com> wrote in message
news:tZPK6.141$V5.300_at_news1.rivrw1.nsw.optushome.com.au...
> Hi people,
>
> Assume I have a table which is just a list of numbers (only 1 column). I
> want to perform a query which shows every number under 100 which is NOT in
> the table. How do I do this?
>
> For example, in my MyTable there is the following data:
> 1, 4, 7, 32, 54 (there are 5 records in my table).
>
> Now how would I write a query to show all the numbers < 100 that are not
in
> this table? ie, it should show 2, 3, 5, 8, .... etc.
>
> Any ideas welcome?
>
> Charlie
>
>
>
>
Received on Fri May 11 2001 - 11:45:14 CDT
![]() |
![]() |