Extract a single table from a sql dump

The only caveat is that you have to know the table that comes after the one you’re trying to extract. ┬áIt’s alphabetical, if you can get a list of tables, otherwise a quick search of the SQL file will get that info for you.
[code lang=”bash”]awk ‘/Table structure for table .table1./,/Table structure for table .table2./{print}’ bigassdatabase.sql > table1.sql[/code]

Leave a Reply