50分求一sql语句 我想在一数据库表news的字段content中的前2000个字符后加入一“|!---page split---|”字符(如果这个字段之前已经含有这个字符就不再增加了。这个sql应该怎么写?谢谢各位。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update a set content=stuff(a.content,2000,0,'|!---page split---|') from news awhere left(a.content,2000) not like '%|!---page split---|%' update news set content=STUFF(content,2000-len('|!---page split---|'),0,'|!---page split---|')where CHARINDEX('|!---page split---|',content)=0 update a set content=stuff(a.content,2000,0,'|!---page split---|') from news awhere a.content not like '%|!---page split---|%' 上面都是通过加后缀来实现的```我用追加字符串也可以实现的:update temp set content=content +'|!---page split---|' where right(content,23) != '|!---page split---|' 分页存储过程问题 如何将numeric型转换为科学计数法表示 求助一个.sql文件,是关于两表更新的。 求助 sql语句 在线等 关于exec master..xp_cmdshell 再求SQL 请问如何获得有默认值的某个字段对应的constraint的名称? 如何进行字段内的内容进行排序 SQL 2k 数据库能不能用语句导出备份到指定位置? SQL SERVER调用外部对象 求救,SQL难题,请高手指导 提一个非常基础的问题,关于SQL2005
set
content=stuff(a.content,2000,0,'|!---page split---|')
from
news a
where
left(a.content,2000) not like '%|!---page split---|%'
where CHARINDEX('|!---page split---|',content)=0
set
content=stuff(a.content,2000,0,'|!---page split---|')
from
news a
where
a.content not like '%|!---page split---|%'
update temp set content=content +'|!---page split---|' where right(content,23) != '|!---page split---|'