0
値が別のテーブルに格納されている範囲の一部ではないテーブルのすべてのレコードを更新する必要があります。値が別のテーブルに格納されている範囲にないレコードを更新する方法
update table_a
join table_range on
(table_a.x >= table_range.fromValue
and table_a.x <= table_range.toValue)
set table_a.someColumn = 'is in range'
しかし、私は次のクエリ結果のレコードを更新する方法を見つけ出すことができません:それは価値だレコードを更新クエリは、範囲の部分は問題ありませんです
select *
from table_a
where x NOT IN (
select x
from table_a inner join table_range on
(x >= fromValue AND x <= toValue)
)
ありがとうございます
これだけです!これはまさに私が探していたものです。どうもありがとう! – user529242