From: Lawrenzo D'Wolcoto <bigdog@pitnet.net>
To: pgsql-sql@postgresql.org
Subject: PSQL SELECT Question.
Date: Thu, 11 Feb 1999 17:29:10 -0600 (CST)
Message-ID: <199902112329.RAA17351@ultra1.pitnet.net> (raw)
Hello everyone!
Heres my question:
I am using JDBC to connect to Postgres, and create a query. The ResultSet
returned by the query contains MetaData about the table. I am using this
table information to build a map of the table.
I need to know how to retrieve an table, with NO rows, or alternativly, just
1 single row (even if more rows exist in the table). ie:
SELECT * TOP 1 FROM TABLE //This does the trick in MS Access
SELECT * FROM TABLE WHERE ROWNUM <= 1 //This works in Oracle?
I need to know how to do this in STANDARD SQL. I would actually prefer
getting NO rows from my query. I remember seeing something like:
SELECT * FROM TABLE WHERE FALSE //This was someones proprietary QL to
provide en empty table (what I would like)
Anyone have any ideas?
Also, I need to know how to do this *WITHOUT* any information about the
coulmns in the table. No names, no keys, nothing. yikes.
PS. Please copy directly to my email, because I am not subscribed to the
majordomo.
Thanks!
Larry Wolcott
bigdog@pitnet.net
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: bigdog@pitnet.net
Subject: Re: PSQL SELECT Question.
In-Reply-To: <199902112329.RAA17351@ultra1.pitnet.net>
References: <199902112329.RAA17351@ultra1.pitnet.net>
* 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