In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to solve the problem of batch modification of Oracle. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Problem: modify other fields according to the unique field code, modify part of the data, the number is tens of thousands of data, the data is large, it is stuck at the beginning! Stupid way, I don't know if you can amend it every year. For other personal reasons, there is really nothing I can do. As follows:
Update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-2Vista, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-2x, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-2Y, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-2Z, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-31'. Update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-32 employees update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-33 update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-34 update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-35 employees update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-36 update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-37' Update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-38 employees update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-39 update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Aids update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3BTO update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Craft update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3D' Update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Globes update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Globes, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Hops, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3Idies, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3J' Update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3LTH, update ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3K, ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3M, ka02_new set aka065=1,aka166=1 where aka060='X-P02CA-A010-A001-3N, etc.
Baidu results: Baidu for a while, many solutions, some of the writing is very rough, do not understand, perhaps their own level problems. Some people really do not understand, the personal level can not keep up with.
Solution: the final solution, still the old one, is to create a new temporary table (Table B: a table 2017) and encode the only modified field and place the modified data in Table B. The sql is roughly as follows (original table A:ka02_new, unique field aka060, modified fields are aka065 and aka166 respectively):
Update ka02_new b set b.aka065 = (SELECT a.aka065 FROM asides 2017 a WHERE a.aka060 = b.aka060), b.aka166 = (SELECT a.aka166 FROM asides 2017 a WHERE a.aka060 = b.aka060) WHERE b.aka060 in (SELECT a.aka060 FROM asides 2017 a). Thank you for reading! This is the end of this article on "how to solve the problem of batch modification of Oracle". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.