0
点赞
收藏
分享

微信扫一扫

Mysql截取字符串 更新字段的部分内容

截取master_major前六位 更新到master_major_code

UPDATE special_teacher_new set master_major_code = (substring(master_major,1,6))

扩展:

update table set     A   = concat(substring(A,1,6),'bbb'); 拼接字符串



根据其他表字段数据更新 当前表字段

update special_manager s ,static_area a

set s.area_id = a.id

where s.area_name = a.name


__________________________________________________________________________________

若有帮助到您,欢迎点击推荐,您的支持是对我坚持最好的肯定(*^_^*)

你要保守你心,胜过保守一切。

作者:刘俊涛的博客​​




举报

相关推荐

0 条评论