八达网

标题: sql语句求助 50水晶 [打印本页]

作者: deathright    时间: 2009-5-31 20:38
标题: sql语句求助 50水晶
本帖最后由 deathright 于 2009-5-31 20:40 编辑

不好意思,问下各位
sql replace函数格式
update 表明 set 字段名 =replace(字段名,'asdasdadasdasdasd','')
作用事把字段名内asdasdadasdasdasd为空

这段代码那错了???

谢谢

50水晶
作者: deathright    时间: 2009-5-31 20:41
定义顶
作者: lihuizmm    时间: 2009-5-31 20:44
update table set message =REPLACE(message ,'替换前内容','替换后内容')
作者: shinobi    时间: 2009-5-31 20:44
为什么要用replace啊?
update 表明 set 字段名 = " " where 字段名 = 要改的字段值
一般都这么做的吧
作者: world1    时间: 2009-5-31 20:47
提示: 作者被禁止或删除 内容自动屏蔽
作者: deathright    时间: 2009-5-31 20:48
为什么要用replace啊?
update 表明 set 字段名 = " " where 字段名 = 要改的字段值
一般都这么做的吧
shinobi 发表于 2009-5-31 20:44

给个例句可以吗?
作者: lihuizmm    时间: 2009-5-31 22:52
看错了,没注意到你后面那个'',还以为你格式错了呢。。。
你运行报什么错?
作者: =GL=nO_nAme    时间: 2009-5-31 22:53
......
作者: 大爷大爷    时间: 2009-5-31 22:53
什么东西
作者: arcturuszx    时间: 2009-5-31 22:54
提示: 作者被禁止或删除 内容自动屏蔽
作者: 9705390    时间: 2009-6-1 11:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: ohshit    时间: 2009-6-1 12:08
请看手册




欢迎光临 八达网 (https://www.8-da.com/) Powered by Discuz! X2.5