Received: from kss.net.au ([203.41.122.41]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA03753 for ; Wed, 23 Feb 2000 01:33:13 -0500 (EST) (envelope-from carolyn@kss.net.au) Received: from kss.net.au (coco [10.10.1.9]) by kss.net.au (8.8.7/8.8.7) with ESMTP id EAA10439 for ; Thu, 24 Feb 2000 04:36:15 +1100 Message-ID: <38B37F13.C1D2D6F4@kss.net.au> Date: Wed, 23 Feb 2000 17:32:51 +1100 From: Carolyn Wong Organization: Kwiker Software Solutions X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: SQL Script Question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm trying to write SQL script to create tables as follows: -------------------------------- drop table xxx; create table xxx ( ...... ); grant all on xxx to public; -------------------------------- Before dropping the table, I'd like to check if the table exists as the following psuedo code: if drop table xxx; How can i write this 'if' condition? Or are there any other ways to check this?? Thanks in advance.