Re: Function TOP

From: "Len Morgan" <len-morgan(at)crcom(dot)net>
To: "Tomasz Janyska" <tjanyska(at)laser(dot)pl>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function TOP
Date: 2001-01-02 20:13:40
Message-ID: 007f01c074f8$805772e0$0908a8c0@H233.bstx.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If the data is sorted, you can add "... LIMIT <number of records you want,
i.e. 10> ;" at the end of the query. If you want a percentage (like TOP
10%) you will have to first find out (maybe with COUNT()) how many records
apply and then do a little math to find out what the number of your LIMIT
clause should be.

Len Morgan

-----Original Message-----
From: Tomasz Janyska <tjanyska(at)laser(dot)pl>
To: pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>
Date: Tuesday, January 02, 2001 1:25 PM
Subject: [GENERAL] Function TOP

>Is there in Postgres such a function like TOP in MSSQL?
>
>
>

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-02 20:47:23 Re: cyrillic and sort order (ORDER BY)
Previous Message Mihail Marinov 2001-01-02 19:56:28 cyrillic and sort order (ORDER BY)