E
E
eellazy2020-03-30 19:15:51
SQLite
eellazy, 2020-03-30 19:15:51

How to merge three sqlite tables?

There are 3 tables that have the same columns. How to merge these tables into one? But it is worth considering that there is a primary key - id. They need to be merged and, as far as I understand, reassign new id to all records.
Also interested in the possibility of data validation. For example:
Each table has a name column. If there are identical values ​​of the name field, then supplement them, but do not duplicate them so that there are no identical records in the database. Tables may contain different fields for the same name.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-03-30
@dimonchik2013

select + insert ignore / insert on duplicate
make copies and start, send an example of a query that does not work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question