7,714
社区成员
发帖
与我相关
我的任务
分享
t1 t2
id file2 file3 file1 file2
1 1 2 1 1
2 2 3 2 3
3 3 2 1 2
3 4
字段1 字段2 字段3 (字段1和字段2为表的主键)
a 1 s
a 2 d
a 3 s
a 4 d
b 1 s
b 2 d
b 3 s
b 4 s
b 5 d
b 6 d
c 1 a
c 2 s
c 3 a
update t2 inner join t1 on t2.file2=t1.file2
set t2.file1=t1.id