S
S
seven56742022-03-26 08:58:27
SQLite
seven5674, 2022-03-26 08:58:27

How to merge two large tables into one?

Greetings,

There are two tables with a dimension of 20 million and 10 million records, respectively
. The first table contains 5 fields, the second 3 fields that the first table also contains

. Is there any way to combine tables into one and with the correct ratio of fields?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2022-03-26
@seven5674

In a table with 5 fields (A), create a unique index on the common identifier/s.
Then

INSERT OR IGNORE INTO A (col1, col2, col3)
SELECT col1, col2, col3 FROM B;

Something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question