Sql 字符串替换

(1) 字符串替换

Update SongADD_EMH0055 SET songno = REPLACE(songno, '231', '233') where songno like '%102231%'

(2) 2个字段拼接成一个字段查询   MaxGroupName   MaxGroupNameEn 

select MaxGroupID, cast(MaxGroupName as varchar(50))+'('+cast(MaxGroupNameEn as varchar(50)) + ')'
as MaxGroupName from Business_LBMaxGroup union select '0' as MaxGroupID ,'全部大组' as MaxGroupName

 

posted @ 2014-01-15 17:12  盛开的雨季  阅读(832)  评论(0编辑  收藏  举报