John,
Friday, October 04, 2002, 6:41:46 AM, you wrote:

JK> Hi, I am trying to use mysqldump to dump the structure of a single database
JK> and want the output to make create table commands that include the IF NOT
JK> EXISTS switch so that when the file is imported into an existing database it
JK> does not write over tables with the same name. Does anyone know if this is
JK> possible with mysqldump and if so what option achieves this? Thanks.

You can't.

You can add DROP TABLE before each CREATE table statement using
--add-drop-table option. You can run mysql with --force option when
you restore tables from dump file.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.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

Reply via email to