简体   繁体   English

如何替换sql服务器中表中的字符串

[英]How to replace a string in the table in sql server

I have a table named LIST , can anyone please tell me how to replace all the data under the table LIST In sql server我有一个名为LIST的表,谁能告诉我如何替换 sql 服务器中 LIST 表下的所有数据

You can replace string in SQL table by following command您可以通过以下命令替换 SQL 表中的字符串

Update <tablename> SET <columnname> = '<newstring>' 

If you have any condition you can add following line after above line如果您有任何条件,可以在上一行之后添加以下行

where <condition>

Condition can be something like条件可以是这样的

columnname = 'sometext'
UPDATE
    LIST
SET
    COLUMN1    =    'SOMETHING BESIDES WHAT IS CURRENTLY IN COLUMN1'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM