Skip site navigation (1) Skip section navigation (2)

RE: Re: Top

From: pmiranda(at)vm(dot)com(dot)br
To: pgsql-admin(at)postgresql(dot)org
Subject: RE: Re: Top
Date: 2001-08-08 18:40:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
----- Forwarded by Paulo Miranda/RJ/VMCS on 08/08/01 15:39 -----
                    Paulo Miranda                                                                                  
                                         To:     "Michael Ansley (UK)" <Michael(dot)Ansley(at)intec-telecom-systems(dot)com>  
                    08/08/01 15:34       cc:                                                                       
                                         Subject:     RE: [ADMIN] Re: Top(Document link: Paulo Miranda)            


Thank you very much. After writing the first message, (cause I'm behind
schedule) I tried that and it worked fine. Thanks for the other tips,
they'll be very useful for me.

I wanna thank Colin, too, and ask him to forgive my mistake. TOP is, in
fact, a SQLSERVER's SELECT clause (or whatever they call it). I don't even
know if there's something that compares to this in Oracle.

In portuguese, we say "obrigado" for "thank you". From now on, I ask you to
allow me to use this expression instead of the one in english. (I know I'll
make some many questions to you...)



                    "Michael Ansley (UK)"                                                                                             
                    <Michael(dot)Ansley(at)intec-telecom-sy        To:     pgsql-admin(at)postgresql(dot)org, "'pmiranda(at)vm(dot)com(dot)br'"                
          >                              <pmiranda(at)vm(dot)com(dot)br>                                                      
                    Sent by:                                cc:                                                                       
                    pgsql-admin-owner(at)postgresql(dot)org        Subject:     RE: [ADMIN] Re: Top                                          
                    08/08/01 05:54                                                                                                    

Hash: SHA1

Anyway, it's a combination of ORDER BY and LIMIT:


or, if you want the bottom ten:

SELECT * FROM table1 ORDER BY field1 LIMIT 10;

Or, if you want the next ten:

SELECT * FROM table1 ORDER BY field1 LIMIT 10, 10;

or something to that effect.


>> -----Original Message-----
>> From: Colin 't Hart [mailto:cthart(at)yahoo(dot)com]
>> Sent: 08 August 2001 08:17
>> To: pgsql-admin(at)postgresql(dot)org
>> Subject: [ADMIN] Re: Top
>> > Please, does anyone know if is there in Postgres's SQL language
>> > an equivalent for Oracle's TOP ?
>> Ummm, Oracle's SQL doesn't have a TOP.
>> Are you thinking of SQL Server?
>> Cheers,
>> Colin
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to
>> majordomo(at)postgresql(dot)org

Version: PGPfreeware 6.5.3 for non-commercial use <>


This e-mail and any attachments are confidential and may also be privileged
and/or copyright
material of Intec Telecom Systems PLC (or its affiliated companies).  If
you are not an
intended or authorised recipient of this e-mail or have received it in
error, please delete
it immediately and notify the sender by e-mail.  In such a case, reading,
printing or further dissemination of this e-mail is strictly prohibited and
may be unlawful.
Intec Telecom Systems PLC. does not represent or warrant that an attachment
hereto is free
from computer viruses or other defects. The opinions expressed in this
e-mail and any
attachments may be those of the author and are not necessarily those of
Intec Telecom
Systems PLC.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

pgsql-admin by date

Next:From: Gary StainburnDate: 2001-08-09 08:29:41
Subject: Re: upgrading RPM query
Previous:From: Ragnar KjørstadDate: 2001-08-08 17:49:34
Subject: Re: upgrading RPM query

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group