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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.