Home > database >  At the same time of insert, selectively update the other 3 tables, could it be a complete statement
At the same time of insert, selectively update the other 3 tables, could it be a complete statement

Time:02-23

A table field: address (text, don't repeat), identification (logical)
B table fields: address (text, don't repeat), identification (logical)
C table fields: address (text, don't repeat), identification (logical)
T table fields: matchA (text), matchB (text), matchC (text)

Assume that this is the client to submit to the batch of new data:
 (select matchA='1 nhxjrve9l41, matchB=' 3 nhxjrve9l41, matchC='bc1NHXjRVE9L41' union all 
Select matchA='1 jb4sxthjjfg, matchB=' 3 jb4sxthjjfg, matchC='bc1JB4SXThJJFg' union all
Select matchA='1 kveonmcyvjc, matchB=' 3 kveonmcyvjc, matchC='bc1KveoNMcyvJc' union all
Select matchA='19 b1tyo6372x, matchB=' 39 b1tyo6372x, matchC='bc19B1tyo6372X')
data inserted into a T table at the same time can also update the ABC this 3 tables according to the following conditions:
If the address fields exist in the table A=matchA record, its recognition field to true;
If the address fields exist in the table B=matchB record, its recognition field to true;
If address field exists in table C=matchC record, its recognition field to true;

In a query that can be implemented? Because the data a lot, so can more quickly,
  • Related