Conditional test - Mailing list pgsql-sql

From rickd@open-works.com (Rick Dayao)
Subject Conditional test
Date
Msg-id 4eee2f8d.0112271854.276c1152@posting.google.com
Whole thread Raw
Responses Re: Conditional test
List 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 by date:

Previous
From: Katona Gabor
Date:
Subject: How to union tables and have a field with UNIQUE constraint?
Next
From: Markus Bertheau
Date:
Subject: Re: change null to 0 in SQL script