mysql字段指定位置插入字符串

update  security_user set birthday=  CONCAT(left(birthday,4),'-',right(birthday,LENGTH(birthday)-4))  where LENGTH(birthday)=8 ;
update  security_user set birthday=  CONCAT(left(birthday,7),'-',right(birthday,LENGTH(birthday)-7))  where LENGTH(birthday)=9 ;

猜你喜欢

转载自blog.csdn.net/u012269637/article/details/80594308