This is called a correlated update. UPDATE table1 t1 SET (name, desc) = (SELECT t2.name, t2.desc FROM table2 t2 WHERE t1.id = t2.id) WHERE ... ... <看更多>
To build our UPDATE statement, we are going to need to set our value in tableA equal to a subquery in tableB. Specifically, we are going to ... ... <看更多>