Received: from ultra1.pitnet.net (ultra1.pitnet.net [156.46.121.80]) by hub.org (8.9.2/8.9.1) with ESMTP id SAA83418 for ; Thu, 11 Feb 1999 18:29:11 -0500 (EST) (envelope-from bigdog@pitnet.net) Received: from larry (maper23.pitnet.net [206.190.8.23]) by ultra1.pitnet.net (8.8.8/8.8.8) with SMTP id RAA17351 for ; Thu, 11 Feb 1999 17:29:10 -0600 (CST) Date: Thu, 11 Feb 1999 17:29:10 -0600 (CST) Message-Id: <199902112329.RAA17351@ultra1.pitnet.net> X-Sender: bigdog@email.pitnet.net X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: pgsql-sql@postgresql.org From: "Lawrenzo D'Wolcoto" Subject: PSQL SELECT Question. 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