Or your could ... mysqldump -u<username> -p -h<hostname> --all --add-drop-table --add-locks -- complete-insert --compress --extended-insert --flush-logs --force --opt --ve rbose --databases <databasename> <tablename> > test.sql
----- Original Message ----- From: "swati sandhya" <[EMAIL PROTECTED]> To: "John Kelly" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, October 04, 2002 5:19 AM Subject: Re: Create table if not exists from mysqldump? Hi, Do u mean when u take a dump you need to add before each table "drop table if exists" then here is the command. mysqldump -u<username> -p -h<hostname> --add-drop-table <databasename> <tablename> > test.sql regards, Praveen --- John Kelly <[EMAIL PROTECTED]> wrote: > Hi, I am trying to use mysqldump to dump the > structure of a single database > and want the output to make create table commands > that include the IF NOT > EXISTS switch so that when the file is imported into > an existing database it > does not write over tables with the same name. Does > anyone know if this is > possible with mysqldump and if so what option > achieves this? Thanks. > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list > archive) > > To request this thread, e-mail > <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php