Conditional test

Поиск
Список
Период
Сортировка
От rickd@open-works.com (Rick Dayao)
Тема Conditional test
Дата
Msg-id 4eee2f8d.0112271854.276c1152@posting.google.com
обсуждение исходный текст
Ответы Re: Conditional test  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-sql
I am trying to solve this problem:

If a table exists, drop the table, otherwise continue processing.

For example, if table X exists, then drop table X.  How would I do
this in SQL?  I can query the pg_tables table to see which tables
exist, but I'm looking for an If-Else construct in SQL.

Thanks in advance,

Rick


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

Предыдущее
От: Katona Gabor
Дата:
Сообщение: How to union tables and have a field with UNIQUE constraint?
Следующее
От: Markus Bertheau
Дата:
Сообщение: Re: change null to 0 in SQL script