在 SQLite 中使用子查询更新表 [英] UPDATE table using a subquery in SQLite
本文介绍了在 SQLite 中使用子查询更新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从子查询更新记录.我正在使用以下查询:
I want to update records from a sub-query. I am using the following query:
UPDATE table1 SET a = aa FROM (SELECT a AS aa FROM table2) AS abc WHERE f = 1
这在 SQL Server 中运行良好.但在 SQLite 中不起作用.
This works fine in SQL Server. But doesn't work in SQLite.
有什么想法吗?
推荐答案
SQLite 不支持 UPDATE ... FROM
.请参阅 https://www.sqlite.org/lang_update.html
SQLite does not support UPDATE ... FROM
. See https://www.sqlite.org/lang_update.html
这篇关于在 SQLite 中使用子查询更新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文