有关sql的update操作,急~
来源:百度知道 编辑:UC知道 时间:2024/05/09 08:50:28
F01表两个字段A,B
A , B
a1 1
a2 2
a3 3
a4 4
F02表两个字段A,B
A , B
a1 0
a2 0
a3 0
a4 0
a5 0
a6 0
把F01表中对应的B字段的值更新到F02表中对应的B字段,即使用SQL语句后
F02表变成
A , B
a1 1
a2 2
a3 3
a4 4
a5 0
a6 0
麻烦帮一下忙,积分再给~谢谢
update f02 set f02.b=f01.b from f01,f02 where f02.a=f01.a 通不过~from f01,f02 ????
A , B
a1 1
a2 2
a3 3
a4 4
F02表两个字段A,B
A , B
a1 0
a2 0
a3 0
a4 0
a5 0
a6 0
把F01表中对应的B字段的值更新到F02表中对应的B字段,即使用SQL语句后
F02表变成
A , B
a1 1
a2 2
a3 3
a4 4
a5 0
a6 0
麻烦帮一下忙,积分再给~谢谢
update f02 set f02.b=f01.b from f01,f02 where f02.a=f01.a 通不过~from f01,f02 ????
对应的语句在Access中为
update f01,f02 set f02.b=f01.b where f02.a=f01.a
update F01
set B
values 1
where A = a1
set B
values 2
where A = a2
set B
values 3
where A = a3
set B
values 4
where A = a4
呵呵~~楼上的~是~更新表F02
只是一个更新语句就可以了
update F02
set B=F01.B
from F01,F02
Where F02.A=FO1.A
呵呵~验证过的了~一定对的~给分吧~希望以后有机会讨论~
怎么可能不行呢~我都实验过了那你把第2句改成 set f02.b=f01.b试试~
update f02 set f02.b=f01.b from f01,f02 where f02.a=f01.a