我必须要表T1和T2
T1
Id name open receive close
1 jon 5000 0 5000
2 jim 6000 0 6000
T2
Id name receive
1 jon 5000
2 jim 7000
我想要这样的结果
Id name open receive close
1 jon 5000 5000 10000
2 jim 6000 7000 13000
我正在使用Sqlite
答案 0 :(得分:1)
尝试使用
update t1 set receive=(select t2.receive from t2 where t2.id=t1.id)