Sqlite的多表连接更新

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/xc_zhou/article/details/102596532
1、set时,要将table2的num2的值赋给table1的num1字段,要select一下table2,并在括号关联起来
update table1
set num1 = (select num2 from table2 where table2.pid=table1.id)
where...
更新多个字段时:
update table1