sqlite数据库,t1,200条记录,两个字段code,share;t2 100条记录,两个字段,code,name..
t2的100个code,全部包含在t1中,如何合并t1,t2产生t3,三个字段code,share,name,200条记录?
------解决方案--------------------------------------------------------
怎么合并
select * from t1 left join t2 on t1.code=t2.code
------解决方案--------------------------------------------------------
select t1.code,share,name
from t1 left join t2 on t1.code=t2.code