Re: Support for SQL TOP clause?

From: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
To: "'Chinyi Woo'" <chinyi(dot)woo(at)gmail(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Support for SQL TOP clause?
Date: 2008-01-10 03:19:43
Message-ID: 00ab01c85337$a50ba690$9b0014ac@wbaus090
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

SELECT *

FROM Individual

LIMIT 3

I asked the reverse question moving from PG to MSSQL :-(

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of Chinyi Woo
Sent: Thursday, 10 January 2008 14:14
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] Support for SQL TOP clause?

Hello, everyone

Does Postgresql support query like SELECT TOP 3 * FROM Individual ? If I
use ORDER BY, I have to write non-sql code to get the first row in the
result set, which I try to avoid.

Thanks

Chinyi

THINK BEFORE YOU PRINT - Save paper if you don't really need to print this

*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
e-mail.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ken Johanson 2008-01-10 07:11:11 Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)
Previous Message Chinyi Woo 2008-01-10 03:13:56 Support for SQL TOP clause?