----------------------------------------------------------------------- WORKLOG TASK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TASK...........: more IF EXISTS clauses CREATION DATE..: Fri, 23 Sep 2011, 14:10 SUPERVISOR.....: IMPLEMENTOR....: COPIES TO......: CATEGORY.......: Server-RawIdeaBin TASK ID........: 237 (http://askmonty.org/worklog/?tid=237) VERSION........: WorkLog-4.0 STATUS.........: Un-Assigned PRIORITY.......: 60 WORKED HOURS...: 0 ESTIMATE.......: 0 (hours remain) ORIG. ESTIMATE.: 0 PROGRESS NOTES: DESCRIPTION: It would be nice if more statements were repeatable for use in scripts (See http://www.howtoforge.com/node/4833 for the use of this). I would like to see the IF (NOT) EXISTS clauses added to the RENAME command and it would really be nice if such a clause could be added to the various operations of the ALTER TABLE command. For example: RENAME TABLE IF EXISTS WrongName TO RightName; -- when placed in an update script, it will rename the table if it still has the wrong name, but it will not fail if it already has the right name. ALTER TABLE SomeTable ADD COLUMN IF NOT EXISTS ExtraColumn VARCHAR(255) DEFAULT NULL; ESTIMATED WORK TIME ESTIMATED COMPLETION DATE ----------------------------------------------------------------------- WorkLog (v4.0.0)