android - Join on two table with same primary key but different data -
i trying join 2 tables identical in structure. want join choose data second table if row same primary key exist in both. instance, if have following tables data -
i want join give me -
any appreciated. thanks
something should work:
select table1._id, coalesce(table2.data, table1.data) table1 left join table2 using _id;
Comments
Post a Comment