MySQL Forums
Forum List  »  MySQL Administrator

Re: Copy tables
Posted by: Mike Lischke
Date: September 27, 2005 01:48AM

matt tisdel wrote:

> My problem is whenever I try and
> overwrite the old tables it says it cant because
> there is a table named eqdkpBAK_whatever already.
> Is there a command to simply overwrite the entire
> table or do I need to delete the table and
> recreate it?


The usual way to handle this is to issue a command like "drop table if exists ..." to drop the table in case it exists already. Then it is recreated from the script. Be careful with relationships, though.

Btw: why keeping the tables in a separate schema, just for backup? If you have exported them to a script you can store that in a safe place and have your backup without having to setup another schema only for that purpose.

Mike

Mike Lischke, MySQL Developer Tools
Oracle Corporation

MySQL Workbench on Github: https://github.com/mysql/mysql-workbench
On Twitter: https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/8.0/en/

Options: ReplyQuote


Subject
Written By
Posted
September 23, 2005 02:09PM
Re: Copy tables
September 27, 2005 01:48AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.