RE: Re: Top

Поиск
Список
Период
Сортировка
От Michael Ansley (UK)
Тема RE: Re: Top
Дата
Msg-id 7F124BC48D56D411812500D0B747251480F662@fileserver002.intecsystems.co.uk
обсуждение исходный текст
Ответ на Top  (pmiranda@vm.com.br)
Список pgsql-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

SELECT * FROM table1 ORDER BY field1 DESC LIMIT 10;

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.

MikeA

>> -----Original Message-----
>> From: Colin 't Hart [mailto:cthart@yahoo.com]
>> Sent: 08 August 2001 08:17
>> To: pgsql-admin@postgresql.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@postgresql.org
>>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO3D+BXympNV/C086EQLevwCgpxcbIiA4OWcjmXQhirB0g4Ts4wEAnjSv
WxaprcluB2uhv5gmtaM6rCbI
=jPE0
-----END PGP SIGNATURE-----

_________________________________________________________________________
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, reproducing,
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 по дате отправления:

Предыдущее
От: "Colin 't Hart"
Дата:
Сообщение: Re: Top
Следующее
От: Gary Stainburn
Дата:
Сообщение: Re: upgrading RPM query