Dump mysql as a table with data - version 2

Q: Is there a way to redirect MYSQLDUMP to export VIEW with data (and not just CREATE SQL)? I want to use the resulting SQL to create a new table.

Thanks! John

+4
source share
1 answer

I do not know how to dump only a view without a table. But you can try the following method:

  • Run the following command from the shell:

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

  • Then modify the created sql script manually.
0
source

Source: https://habr.com/ru/post/1310924/


All Articles