截取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
文章來源:劉俊濤的博客 歡迎關注公眾號、留言、評論,一起學習。
__________________________________________________________________________________
若有幫助到您,歡迎點擊推薦,您的支持是對我堅持最好的肯定(*^_^*)
