table1 table2
ID NAME ID NAME WORK
1 a 1 teacher
2 b 2 student
3 c 3 student
4 d 4 teacher
...
其中ID唯一如何UPDATE使table2为
ID NAME WORK
1 a teacher
2 b student
3 c student
4 d teacher
...
ID NAME ID NAME WORK
1 a 1 teacher
2 b 2 student
3 c 3 student
4 d 4 teacher
...
其中ID唯一如何UPDATE使table2为
ID NAME WORK
1 a teacher
2 b student
3 c student
4 d teacher
...
update table2 inner join table1 on table2.id=table1.id set name=table1.name
from table1,table2
where table1.id=table2.id
上面的高手说的都不对!