On 5/16/2013 9:29 AM, Paul Sanderson wrote:
I have two tables of the form

create table1 (id1 int, t1 text)
create table2 (id2 int unique, t2 text)

For those entries in table1 where there is a null in t2 I want to copy the
corresponding entry from table2

update table1 set t1=(select t2 from table2 where id2=id1)
where t1 is null;

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to