home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!hayes!fgreene
- From: fgreene@hayes.com
- Newsgroups: comp.databases.oracle
- Subject: Re: 40 values in desc order
- Message-ID: <6622.2b485a61@hayes.com>
- Date: 4 Jan 93 15:40:17 EDT
- References: <Bzo2t0.67@lut.fi>
- Organization: Hayes Microcomputer Products, Norcross, GA
- Lines: 26
-
- In article <Bzo2t0.67@lut.fi>, hietanen@lut.fi (Pentti Hietanen) writes:
- >
- > What kind of sql sentence should we use to get 40 values
- > from database in descending order?
- >
- > Pentti Hietanen, student of Lappeenranta University of Technology, Finland.
- > internet: hietanen%lut.fi
-
-
- Probably the easiest way is to use the ROWNUM function. For example,
-
- SELECT field1, field2, fieldn
- FROM the_table
- WHERE ROWNUM < 40;
-
- ----------------------------------------------------------------------------
- | Frank Greene | ////// ////// |
- | DELPHI SYSTEMS, Inc. | //// //// |
- | Telephone [615] 458-6032 | //// //// ////// |
- | Compuserve 74200,427 | //// //// //// |
- | 324 Ootsima Way | //// //// //// |
- | Loudon, TN 37774 | ////// ////// ////// |
- ----------------------------------------------------------------------------
- | Of course, any opinions or suggestions are strictly my own |
- ----------------------------------------------------------------------------
-
-