Re: top? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: top?
Date
Msg-id 20020103154644.J15005-100000@megazone23.bigpanda.com
Whole thread Raw
In response to top?  (Richard Rowell <rwrowell@bellsouth.net>)
Responses Re: top?
List pgsql-sql
On Thu, 3 Jan 2002, Richard Rowell wrote:

> Just wondering if there was a "TOP" equivilant in Postgres?
> IE
> select top 1 * from froo
> (only returns 1 row)

select * from froo limit 1;

Usually you'll want to order as well so that you get a meaningfully
chosen row rather than whatever row happens to be scanned first.




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to union tables and have a field with UNIQUE constraint?
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: top?