From: Christof Glaser <gcg@gl.aser.de>
To: juerg.rietmann@pup.ch
To: pgsql-sql@postgresql.org
Subject: Re: select only the first record
Date: Tue, 10 Jul 2001 15:38:55 +0200
Message-ID: <01071015385500.00730@pinguin> (raw)
In-Reply-To: <OF69D0BD4E.6176557A-ONC1256A85.0048269D@pup.ch>
References: <OF69D0BD4E.6176557A-ONC1256A85.0048269D@pup.ch>
On Tuesday, 10. July 2001 15:09, juerg.rietmann@pup.ch wrote:
> Hello there
>
> Is it possible to do a query and selecting only the first record in
> ad table ?
>
> e.g. select FIRST * from cars
SELECT * FROM cars ORDER BY <your pkey> LIMIT 1;
Without ORDER BY, there is no "first" record - any record could be
returned.
Regards,
Christof Glaser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gcg@gl.aser.de, juerg.rietmann@pup.ch
Subject: Re: select only the first record
In-Reply-To: <01071015385500.00730@pinguin>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox