Function TOP

Поиск
Список
Период
Сортировка
Искать

Function TOP

От:
"Tomasz Janyska" <tjanyska@laser.pl>
Дата:
Is there in Postgres such a function like TOP in MSSQL?


Re: Function TOP

От:
"Len Morgan" <len-morgan@crcom.net>
Дата:
If the data is sorted, you can add "... LIMIT  ;" 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 
To: pgsql-general@postgresql.org 
Date: Tuesday, January 02, 2001 1:25 PM
Subject: [GENERAL] Function TOP


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

Re: Function TOP

От:
Ian Harding <iharding@pakrat.com>
Дата:
Tomasz Janyska wrote:

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

LIMIT.  You need an order by clause for the results to be meaningful.

FAQ