Create table if not exists from mysqldump

前端 未结 8 1185
一整个雨季
一整个雨季 2020-12-29 21:35

I\'m wondering if there is any way in mysqldump to add the appropriate create table option [IF NOT EXISTS]. Any ideas?

8条回答
  •  青春惊慌失措
    2020-12-29 22:23

    Not what you might want, but with --add-drop-table every CREATE is prefixed with the according DROP TABLE statement.

    Otherwise, I'd go for a simple search/replace (e.g., with sed).

提交回复
热议问题