In Mysql, if you want to either updates or inserts a row in a table, depending if the table already has a row that matches the data, you can use “replace into”.
How to do it in Sqlite?
Use “INSERT OR REPLACE INTO” .
INSERT OR REPLACE INTO Employee (id, name, role) VALUES (1, 'John Foo', 'CEO');
Or shorten to
REPLACE INTO Employee (id, name, role) VALUES (1, 'John Foo', 'CEO');
You can see this page for more information: http://stackoverflow.com/questions/418898/sqlite-upsert-not-insert-or-replace
Some SQLite tools you can try: https://www.withdata.com/sqlite/