Home > database >  Two contrast table updates
Two contrast table updates

Time:09-19

Oracle with a 15 id number in the table how to update the id for the 18 known table, and 18 in the table only name, id id 15 and 18 3 column in the table with 15 id id only 15 equal, name not only how to break (large amount of data)

CodePudding user response:

In addition to the name conditions, adding id matching conditions are not good
If have repeat of manual processing

CodePudding user response:

With 15 id not match?

CodePudding user response:

So write to don't want to replace will also be replaced

CodePudding user response:

Don't know what you are worried about, please, for example,
references between edge sunseeker reply: 3/f
so write to don't want to replace will be replace

CodePudding user response:

In the table, in the case of a is 15 will have two names,

CodePudding user response:

I write so don't know how to change
Update table 1 set of old id=new id (select the new id card from update table where table 1. The name=update table. Name and table 1. The old id=update table. Old id card)

CodePudding user response:

Is unlikely to have a same name, id card number and the same two people?
references between fifth floor edge sunseeker response:
, in the case of a is 15 there will be two name column in the table,

CodePudding user response:

refer to 7th floor yaiger response:
is unlikely to have the same name, id card number and the same two people?
Quote: 5 reference between building edge sunseeker response:

In the table, in the case of a is 15 will have two names,

So in the id column, there are two id

CodePudding user response:

references between edge sunseeker eighth floor response:
Quote: refer to 7th floor yaiger response:
is unlikely to have the same name, id card number and the same two people?
Quote: 5 reference between building edge sunseeker response:

In the table, in the case of a is 15 will have two names,

So in id the column have two id

This kind of situation I statement may not modify them

CodePudding user response:

If there is a same name, id card number are the same two people, then put these data alone to pull out the manual processing, other application
reference edge, 9/f, sunseeker between response:
Quote: refer to the eighth floor edge sunseeker between response:
Quote: refer to 7th floor yaiger response:
is unlikely to have the same name, id card number and the same two people?
Quote: 5 reference between building edge sunseeker response:

In the table, in the case of a is 15 will have two names,

So in id the column have two id

This kind of situation I statement may not be able to modify the

CodePudding user response:

I wrote
Update table 1 set of old id=(select the new id card from update table where table, the update table name=. Name AND table 1. The old id=update table. Old id card)

CodePudding user response:

Best plus the where condition, in order to avoid table 1 does not exist in the update table id is updated as null

11 references between edge sunseeker response:
I wrote
Update table 1 set of old id=(select the new id card from update table where table, the update table name=. Name AND table 1. The old id=update table. The old id)

CodePudding user response:

First select the only update, not only look at the amount of data, should not be too much, and there should be 15 logo can tell that it is useful that have failed
  • Related