Wednesday, December 23, 2009

MySQL – Extractiing a Single Table from a mysqldump File

If you want to extract "xyz" table from "example.sql" dumpfile, the below statement can extract the desired table.

sed -n '/^CREATE TABLE `xyz`/,/^-- Table structure for table ` `/p' example.sql > xyz.sql 2>error &

No comments:

Post a Comment