sql - How do I merge two sqlite tables using a "where" condition? -
I have two tables, one of them has three columns "word", "count", and "value" Near two columns are "words" and "value" in the second table, each area of the value column has an attached integer value. In the first table, the "Value" column is empty or with placeholder values.
The values of the second table column "value" in the first column column "value" in the "words" column.
For one line, this command
will update the table1 set 'value' = "valuefromTable2", where 'word' = "match wordfromTable2";
Since I have approximately 200k lines to update, I'll use a possible SQLite feature (merge) from the line from the line to the work queue of the code To know
You can do this in with a correlated subquery update
: < / P>
update table1 set 'value' = (select from Table 2 T2 where the table 1.word = t2.word);
Comments
Post a Comment