Is there any tool or script available?
DB Browser for SQLite supports SQL generation.
File
Export
Database to SQL file...
OK
I hope it'll help the others :)
As a quick work around for fewer column tables. We can use string concatenation function. Sample example is-
select 'insert into TABLE_NAME values('''|| COLUMN1 || ''',''' || COLUMN2 || ''',''' || COLUMN3 || ''',''' || COLUMN4 || ''');' from TABLE_NAME
I think what you're looking for is:
sqlite x.db .dump > output.sql
This will dump the SQL to regenerate a database
If you use the Sqlite manager firefox plugin, it supports bulk inserts from INSERT
SQL statements.
Infact it doesn't support this, but Sqlite Browser does (works on Windows, OS X, Linux)
To generate output into a file follow these steps:
$ sqlite3 mytable.db
sqlite> .output output.sql
sqlite> .dump table_name
sqlite> .quit
Hope this helps.
http://sqliteadmin.orbmu2k.de/
SQLite Administrator is a powerful tool if you easily want to create, design or administrate SQLite database files. The SQL code editor helps you to quickly write sql queries with features such as code completion and highlighting. Both major versions of SQLite database files are supported by SQLite Administrator. Features:
* Create / Modify / Delete Tables by Wizard
* Create / Modify / Delete Indices by Wizard
* Create / Modify / Delete Views by Wizard
* Create / Modify / Delete Triggers by Wizard
* SQL Code Completion that supports table aliases
* SQL Code Highlighting
* SQL Error Locating
* Import Data from CSV Files
* Export Data ( XLS / CSV / HTML / XML )
* Store User Queries into Database
* Search for User Queries
* Store Images into Blob Fields ( JPG / BMP )
* Show SQL of each Database Item
* Migrate SQLite2 Databases to SQLite3
* Try to keep Indices and Triggers after modifying a Table