我想更新一个内部连接到另一个表的表,但是应该更新的行应该有特定的条件或不存在于第二个表中:
Update T1
Set STATUS = 'R'
From table1 T1
inner join table2 T2
on T1.ID = T2.ID and T2.STATUS = 'F'
Update T1
Set STATUS = 'R'
From table1 T1
Where T1.ID not exists in(Select T2.ID from table2 T2)
我怎样才能通过一个查询来编写它?