Frage

Recently I've been looking into export options to find an option to remove:

DROP TABLE IF EXISTS and replace it with CREATE TABLE IF NOT EXISTS.

I've seen on other MySQL clients like HeidiSQL or sequelPro (for MAC) where you can tick a option to include drop table or not, but couldn't find any related thing in the MySQL Workbench.

It's very dangerous as usually when exporting and importing to exchange data with other tables, it simply DROPS tables when they exist rather then just updating them.

I've did research about the issue, and all I'm getting is an explanation about drop table method itself.

I've been using MySQL Workbench for quite sometime, and now I'm really thinking to switch to another MySQL client because of this.

Im using MySQL Workbench Community edition version 8.0.12.

Thanks in advance.

War es hilfreich?

Lösung

This is not a limitation of MySQL Workbench, but one of mysqldump (which is used by Workbench to create the data export). See also Create table if not exists from mysqldump.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit dba.stackexchange
scroll top