表结构不够完善,没有时间字段记录更改的时间;很难判断哪个是新值,这个用触发器实现比较好,就不用查看记录了
insert into user(sx,name,password)
select sx,name,(修改数据的表达式) from user where (能得到要修改的记录的条件表达式)
insert into user ( name,password,sex )
select name,'新的值',sex
from user
where name = 'aaa'
insert into user(sx,name,password) values('男', 'aaa', 'bbb')
insert into user(sx,name,password)
select sx,name,'bbb' from user where name='aaa'