我正在使用以下语句查询一列:
SELECT t1.col1 from table1 t1,table2 t2
WHERE t1.col1 = t2.col2 and t2.col3 IN (data1,data2);
我正在尝试更新满足上述where条件的t1.col1,但出现错误。
这是我尝试过的更新语句:
update t1 set t1.col1 = 1 from table1 t1 INNER JOIN table2 t2 where t2.col3 IN ( data1,data2 );
如果列出的数据与t2.col3中的数据匹配,我想更新t1.col1的值