Description of the Data truncation and Replacement Methods in SQL Server, SQL Server
REPLACE (to modify the field name, 'specific character to be replaced ', 'replacement character ')
Table Structure and insert data
Create database testgouse testgocreate table TestTable (UserName VARCHAR (50), UserPwd VARCHAR (50) goinsert into TestTable (UserName, UserPwd) VALUES ('asdffff', 'wwweee ') insert into TestTable (UserName, UserPwd) VALUES ('asdffff', 'wwweee ') insert into TestTable (UserName, UserPwd) VALUES ('asdffff', 'wwweee ') insert into TestTable (UserName, UserPwd) VALUES ('asdffff', 'wwweee ') insert into TestTable (UserName, UserPwd) VALUES ('asdffff', 'wwweee ')
First Query Result
Execute the data replacement function
UPDATE TestTable SET UserName = (REPLACE (UserName, 'ffffff', 'aa '))
Result set of the second query
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!