开发者

Dump mysql view as a table with data - version 2

Q: Is there a way to direct MYSQLDUMP to export VIEW's with data (and not just the CREATE SQL开发者_如何学Python)? I want to use the resulting SQL to create a new table.

Thanks! Jon


I don't know method how to dump only view without table. But you could try next method:

  1. Run next command from shell:

    mysql -u[username] -p[password] -e "SHOW CREATE VIEW [view_name]" > [view_name]_dump.sql

  2. Then modify generated sql script manually.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜