Re: ?? If Table Exists, Drop Table, then Create Table ??

From: Date: Tue, 27 Nov 2001 17:18:29 +0000
Subject: Re: ?? If Table Exists, Drop Table, then Create Table ??
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14615@lists.php.net to get a copy of this message
In article <MPG.166d7d06fc6bf74d989699@216.92.131.4>, mrbaseball34@hotmail.com <SNIP> > Is there anything like the first line from mySQL? > I need to check if a table exists and drop it if it > does so it can be recreated. I do not have access to > any admin facilities on my host so I need to be able > to do this in a script I can modify. > Found it... 'In MySQL Version 3.22 or later, you can use the keywords IF EXISTS to prevent an error from occurring for tables that don't exist.' DROP TABLE [IF EXISTS] tbl_name [, tbl_name,...] [RESTRICT | CASCADE]

« previous php.db (#14615) next »