SQL的CONCAT()多个字段连接——拓展使用update批处理一个字段

* CONCAT(str1,str2,…)使用结果:str1str2*

SELECT CONCAT(';',gname) FROM g 


----------
结果:    ;gname1
        ;gname2
        ....

实例拓展update批处理:update table1 的所有的—字段1的一个字段所有信息前添加‘;’

UPDATE table set gurl = CONCAT(';',gurl)

猜你喜欢

转载自blog.csdn.net/majipeng19950610/article/details/78294823