I am querying a column using the below statement:
SELECT t1.col1 from table1 t1, table2 t2
WHERE t1.col1 = t2.col2 and t2.col3 IN (data1, data2);
I am trying to update the t1.col1 satisfying the above where condition but I get errors.
here is the update statement I tried:
update t1 set t1.col1 = 1 from table1 t1 INNER JOIN table2 t2 where t2.col3 IN ( data1, data2 );
I want to update the value of t1.col1 if the listed data matches the data in t2.col3