Thread

  1. desc and asc

    Mike Lemler <coronach@datacruz.com> — 1998-06-03T17:08:45Z

    The nifty little booklet I have that tells the the ANSI SQL92 standard for
    desc and asc seems not to work with order by.  Could some one post an example?
    
    Thanks
    
    
    
  2. Re: [SQL] desc and asc

    Herouth Maoz <herouth@oumail.openu.ac.il> — 1998-06-03T17:36:34Z

    At 20:08 +0300 on 3/6/98, Mike Lemler wrote:
    
    
    > The nifty little booklet I have that tells the the ANSI SQL92 standard for
    > desc and asc seems not to work with order by.  Could some one post
    > an example?
    
    Sure:
    
    testing=> SELECT engterm FROM glossary
    testing-> WHERE dict=1 AND engterm IS NOT NULL
    testing-> ORDER BY engterm ASC;
    engterm
    -------
    Mafia
    Stereo
    change
    geek
    green
    plasma
    stam
    (7 rows)
    
    testing=> SELECT engterm FROM glossary
    testing-> WHERE dict=1 AND engterm IS NOT NULL
    testing-> ORDER BY engterm DESC;
    engterm
    -------
    stam
    plasma
    green
    geek
    change
    Stereo
    Mafia
    (7 rows)
    
    Herouth
    
    --
    Herouth Maoz, Internet developer.
    Open University of Israel - Telem project
    http://telem.openu.ac.il/~herutma
    
    
    
    
  3. Re: [SQL] desc and asc

    jose' soares <sferac@bo.nettuno.it> — 1998-06-04T10:26:50Z

    On Wed, 3 Jun 1998, Mike Lemler wrote:
    
    > The nifty little booklet I have that tells the the ANSI SQL92 standard for
    > desc and asc seems not to work with order by.  Could some one post an example?
    > 
    > Thanks
    hygea=> select * from prova order by testo asc;
    testo
    -----
    ALFA
    BETA
    ZEBRA
    ZETA
    zebra
    (5 rows)
    
    hygea=> select * from prova order by testo desc;
    testo
    -----
    zebra
    ZETA
    ZEBRA
    BETA
    ALFA
    (5 rows)
                                                    Jose'