1

I can .dump a sqlite3 database but the dump file is formatted to Microsoft Access and SQL Server specifications - even has square brackets around reserved words, e.g. ... [Username] ....

What I need is a standard SQL export but I can't spot how to do this.

The eventual intended target is MySQL.

jmkgreen
  • 1,633
  • 14
  • 22

1 Answers1

0

The output of .dump shows the table creation statements in exactly the same way you executed them. They use SQL-Server-compatible quoting only if you used it in the first place.

There is no built-in mechanism to output the schema in a different format. You have to convert it manually, or with a script; see Quick easy way to migrate SQLite3 to MySQL?

Community
  • 1
  • 1
CL.
  • 173,858
  • 17
  • 217
  • 259
  • We discovered to our horror typos in the original table creation statements (column types) included in the dump file validating what you say. I'm rather disappointed SQLite allows this. Meantime I've extended a existing Python script that does as you suggest and am using this - far more work than originally budgeted for but there. Thanks for your time. – jmkgreen Feb 05 '16 at 11:03