Hi
I'm new to SQLite and I'm still learning. It's unclear to me how to update
many records efficiently in a table.
For example, given 2 tables t1 and t2, both with 2 columns as follows...
Table t1:
ID name
-- ----
1 aaaa
2 NULL
3 NULL
4 bbbb
(~1 million records)
Table t2:
ID name
-- ----
2 XXXX
4 YYYY
(~500,000 records)
... I would like to update the 'name' column in records of table t1, so that
they are the same as the 'name' column in table t2 when the ID columns
match.
In other words, given the above tables t1, t2, I would like t1 to look like
as follows after update:
Table t1:
ID name
-- ----
1 aaaa
2 XXXX
3 NULL
4 YYYY
(~1 million records)
What is an efficient way of doing it?
Can this be done in one SQL query?
I'm using C SQLite API.
Thanks
Dominique
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users