一、比如表名user中,字段名telephone的值等于mobile的值怎么写呢?用户填写mobile时,telephone也等于对应值。
二、如果批量修改表名user中telephone的值=mobile的值?
可以定义触发器
--全部覆盖
update user set telephone=mobile where 1=1;
--只更新telephone为空的
update user set telephone=mobile where telephone is null;
既然你mobile表里有用户对应的telephone了,你还造个表存这个干嘛~~