I thought the standard way of dealing with this was

generic "drop {object}"

specific "if error then ignore"

Allen Gilliland wrote:
lame-o.  well, that's why i asked first.


Dave wrote:
I'm not opposed to IF EXISTS but only if we can do it in a
cross-database way. It's not supported in PostgreSQL, Derby or Oracle.
So if you want to add it, I guess you'll need a separate
droptables.sql script for MySQL.

- Dave


On 12/6/06, Allen Gilliland <[EMAIL PROTECTED]> wrote:
anyone know if the sql syntax for "drop table if exists <tablename>" is
standard across all dbs?  i would like to update our drop tables script
because i tend to get my test dbs in a strange state from time to time
where not all the tables are dropped and the current script dies when it
tries to drop a table that doesn't exist :/

so, anyone opposed to updating the droptables script to include "if exists"?

-- Allen


--

Dave

*David Levy *
*Principal Engineer*
*Sun Microsystems Ltd.*
55, King William St.,
London EC4R 9ND
United Kingdom

        
Phone +44 (0) 20 7469 9908/x18308
Mobile +44 (0) 7710-360922

Blog http://blogs.sun.com/DaveLevy
Email [EMAIL PROTECTED]

Sun Proprietary & Confidential . This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privilidged information. Any unauthorised review, use, disclosure or distribution is prohibited. If you are not the intended recepient, please contact the sender by reply e-mail and destroy all copies of the original message.

Reply via email to