数据库
首页 > 数据库> > MySQL 姓名两个字中间加两个空格

MySQL 姓名两个字中间加两个空格

作者:互联网

SELECT * FROM `mytable` WHERE CHARACTER_LENGTH(xingming)=2
SELECT CONCAT(LEFT(xingming,1),'  ',RIGHT(xingming,1))  FROM `mytable` WHERE CHARACTER_LENGTH(xingming)=2
UPDATE`mytable` SET xingming=CONCAT(LEFT(xingming,1),'  ',RIGHT(xingming,1)) WHERE CHARACTER_LENGTH(xingming)=2


标签:xingming,两个,CHARACTER,mytable,空格,LENGTH,RIGHT,MySQL,WHERE
来源: https://www.cnblogs.com/emanlee/p/16365199.html