Select t1. The from t1 where a t1. A=x and t1. Like b y % %, then update the set t1. A=z;
Preliminary idea is to make a loop to update, but does not support SQL array, collection and inappropriate, t.a (x), t.b (y), t.a (z) value is a collection, is 6000, is simply a query based on conditions in the t.a and t.b t.a all tables, and then update t.a
What is the good solution? Single table data in about 20000 lines,
CodePudding user response:
Can take the 11 table by combining several of the same field and the primary key in a tableCodePudding user response:
Using the merge into t(
Select a, b, z from t1 where a... And b...
Union all
Select a, b, z from t2 where a... And b...
.
Union all
Select a, b, where a z from t11... And b...
) u
On (t.a=u.a and t.b=u.b)
The when matched then
Update the set t.a=u.z;
Probably on this train of thought,