On Wed, Mar 23, 2016 at 1:02 PM, Keith Medcalf <kmedcalf at dessus.com> wrote: > > Do you mean something like this, perchance? This sets .mode insert > <tablename> then does a select ..., which outputs the selected data in the > form of INSERT statements into a table called <tablename>. The .mode list > just allows other commands to be added to the file ...
I already considered the .mode insert, the problem is that while all databases have the same table columns not all have the same column order (some columns have been added to existing databases and some databases where created with new schemas), so having INSERTs without the column list is not suitable. Another problem I'm facing is foreign keys from other tables, and therefore I'm looking at a script that, via table_info, extracts the column list and builds SQL to export and reimport data. But it is a lot of work to just drop a constraint, that's why I'm searching for smarter ways. Luca