Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating insert statements from an sqlite table

Tags:

Is there any tool or script available?

like image 685
kost Avatar asked Jun 10 '09 03:06

kost


People also ask

How manually insert data in SQLite database?

If you want to inset the data manually(fully graphical) do the following: Go to the DDMS perspective. File explorer (tab-menu) Locate your db (/data/data/com.

What does SQLite insert return?

In the INSERT statement above, SQLite computes the values for all three columns. The RETURNING clause causes SQLite to report the chosen values back to the application. This saves the application from having to issue a separate query to figure out exactly what values were inserted.


2 Answers

I think what you're looking for is:

sqlite x.db .dump > output.sql

This will dump the SQL to regenerate a database

like image 130
Alex Taylor Avatar answered Oct 06 '22 01:10

Alex Taylor


DB Browser for SQLite supports SQL generation.

  • Go to File
  • Select Export
  • Click to Database to SQL file...
  • A popup screen will be shown.
  • There you can choose export options and click OK
  • It'll prompt for a location to save generated sql file.

I hope it'll help the others :)

like image 32
Mehmet Recep Yildiz Avatar answered Oct 06 '22 00:10

Mehmet Recep Yildiz