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

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting NON-existing data

Re: Getting NON-existing data

From: Maarten.. <mgeurts_at_tip.nl>
Date: Thu, 24 Jun 1999 00:18:08 +0200
Message-ID: <37715D1E.796E5E1A@tip.nl>


select 1 from dual union select 2 from dual union;

results in

        1 (column header)


        1
        2

etc...

easier would be if you know a table that is filled (some data dictiontionry table could do...)

select rownum from all_tables where rownum <11;

this does not work in join´s (depends what you expect) since rownum is the result.
depends what you want to do with it.

Niek Kerkemeijer wrote:

> Hi,
>
> I have a nice question:
> I need oracle to generate a number-range for me without having
> a table containing these values.
>
> Example:
> I have an empty database (there are no tables in it) and I need
> a query which results in the following:
>
> +------+
> | id |
> +------+
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> | 8 |
> | 9 |
> | 10 |
> +------+
>
> Any ideas?
>
> Niek.
Received on Wed Jun 23 1999 - 17:18:08 CDT

Original text of this message

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