drop table if exists

From: "Jason Watkins" <jason_watkins(at)pobox(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: drop table if exists
Date: 2001-07-03 21:24:29
Message-ID: 018b01c10406$8bcbaae0$426f2a40@boondocksaint
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How can I duplicate the behavior of:

DROP TABLE IF EXISTS mytable;

CREATE TABLE mytable (
blah,
blah
);

INSERT INTO mytable
(blah)
VALUES
(blah);

in other words, so that I have a single sql file that restores the database
to a known state.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Alex Pilosov 2001-07-03 22:18:00 Re: count(*)
Previous Message Martín Marqués 2001-07-03 16:27:15 Re: count(*)