PSQL SELECT Question.

Поиск
Список
Период
Сортировка
От Lawrenzo D'Wolcoto
Тема PSQL SELECT Question.
Дата
Msg-id 199902112329.RAA17351@ultra1.pitnet.net
обсуждение исходный текст
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: David Hartwig
Дата:
Сообщение: Plpgsql Language Feature?
Следующее
От: jwieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [SQL] Plpgsql Language Feature?