MySQL:根据条件将值从表复制到另一个表
我需要从points表中复制值,其中user.id=points.user\u id和points.type='all' 适用于所有用户 表结构: 用户: 要点:MySQL:根据条件将值从表复制到另一个表,mysql,Mysql,我需要从points表中复制值,其中user.id=points.user\u id和points.type='all' 适用于所有用户 表结构: 用户: 要点: id user_id type value 1 1 all 34 2 1 cat 5 3 2 all 2 4 3 day 1 5
id user_id type value
1 1 all 34
2 1 cat 5
3 2 all 2
4 3 day 1
5 4 all 55
谢谢,在p.user\u id=u.id上更新用户u连接点p
设置u点=p值
其中p.type='all'
id user_id type value
1 1 all 34
2 1 cat 5
3 2 all 2
4 3 day 1
5 4 all 55