Cross-table UPDATE in SQLITE3

后端 未结 4 605
情话喂你
情话喂你 2020-12-10 04:59

In SQL Server, I can do something like this:

UPDATE tbl1 
   SET col2 = tbl2.col2 
  FROM table1 tbl1 
 INNER JOIN table2 tbl2 
    ON tbl1.col1          


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 06:03

    For what it's worth, Microsoft SQL Server and MySQL are the only brands of database that support multi-table updates, and the syntax each uses is not similar.

    This feature is not part of standard SQL. So it's not surprising that support for multi-table update (and delete) is nonstandard and not supported by many brands.

    Anyway, I'm glad you found a solution that works for your task.

提交回复
热议问题