In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how Sql replaces all the contents in the table in batches. The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how Sql replaces all the contents in the table in batches.
The copy code is as follows:
Declare @ t varchar, @ c varchar @ declare table_cursor cursor for select a.name from sysobjects an and c.name in syscolumns b, systypes c where a.id=b.id and a.xtypepaperu' and c.name in ('char',' nchar',' nvarchar', 'varchar','text','ntext'/*-- here if your text (ntext) type does not exceed 8000 (4000) length You can only use * /) declare @ str varchar, @ str2 varchar @ str='' / * here is the character you want to replace * / set @ str2='' / * the replaced character * / open table_cursor fetch next from table_cursor into @ t while (@ @ fetch_status=0) begin exec ('update [' + @ t +'] set ['+ @ c +'] = replace (['+ @ c +'] as varchar (8000)) '' + @ str+''','''+ @ str2 +')') fetch next from table_cursor into @ t recorder end close table_cursor deallocate table_cursor Thank you for your reading, the above is the content of "how Sql replaces all table contents in batches". After the study of this article, I believe you have a deeper understanding of how Sql replaces all table contents in batches, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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: 244
*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.