...a','b','c'三个字符串,用一句sql语句用replace怎么替换答:比如将A表中姓名字段的a,b,c分别替换成你,我,他 select replace(replace(replace(姓名,'a','你'),'b','我'),'c','他') from A表这个需要从最内部的往外看 最里边的是replace(姓名,'a','你'),然后外边再套replace,把replace(姓名,'a','你')当做一个字段,稍微理解下就懂了,
如何把sql中的,替换成'答:table #temp -- select * from #temp([name] varchar(36))--插入测试数据insert into #tempselect 'A,BC'union allselect 'AB,C'union allselect 'A,B,C'--执行","被替换成"'"select [name],replace([name],',',''') as name_change -- 使用转义符,例子:select '''from #temp...