Reputation: 51
I am trying to select records from a SQLite.db3 table and create a new insert.sql file.
these are the commands that I have used:
SQLite> .mode insert
SQLite> .output newFile.sql
SQLite> .dump
The problem I have is that I do not want to copy the entire db into newFile.sql. I only want to certain data from a table like: select * from table1 where status = 1
Upvotes: 0
Views: 537
Reputation: 51
I have found a working solution:
sqlite> .open Corrupt.db3
sqlite> .mode insert
sqlite> .output NewTable.sql
sqlite> select * from OldTable where Status = 1;
sqlite> .output stdout
Upvotes: 1