ultrus Posted January 10, 2008 Share Posted January 10, 2008 Hello, Normally, I would export a table in phpMyAdmin as a .sql file so that I can import that file into another database on another system. Today, I need a different solution as I'm migrating a 400MB+ table into an SQLLite database, separating the table into 708 smaller tables that make sense for the project. How do I export query results as a .sql file? I understand how to export a query as a table like this: CREATE TABLE subTable SELECT * FROM hugeTable WHERE 1; Of course, that would create 708 tables that would be quite the hassle to export one at a time through phpMyAdmin. If I had 708 .sql files, I can write a script to import these to the new database. OR Perhaps I should create tab delimited or xml files that a script will parse and write to the database...just solved my problem while typing! heh. I'm open to any other creative suggestions. Link to comment https://forums.phpfreaks.com/topic/85459-subdividing-1-mysql-table-into-several-tables-exporting-as-sql-files/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.