UPDATE table using a subquery in SQLite

笑着哭i 提交于 2019-12-11 10:27:00

问题


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

This works fine in SQL Server. But doesn't work in SQLite.

Any Idea?


回答1:


SQLite does not support UPDATE ... FROM. See https://www.sqlite.org/lang_update.html



来源:https://stackoverflow.com/questions/11825667/update-table-using-a-subquery-in-sqlite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!