将字段中指定的字符替换成别的字符:
select 字段1=replace(字段1,'x','y') from table1 where ID=106
将字段1中原来的字母x全部替换成y,更新类似:
更新:
update table1
set 字段1=replace(字段1,'x','y')
where ID=106
set 字段1=replace(字段1,'x','y')
where ID=106
删除重复记录:
delete table1 from table1 as a
where id>
(SELECT min(ID) from table1 where AuthenID = a.AuthenID
and Standard=a.Standard)
where id>
(SELECT min(ID) from table1 where AuthenID = a.AuthenID
and Standard=a.Standard)
本文介绍如何使用SQL语句替换字段中的特定字符以及如何删除表中的重复记录。通过具体实例展示了SQL更新语句和删除语句的应用。
6889

被折叠的 条评论
为什么被折叠?



