有一个数据库sondb.mdb,里面有两个表,table1和table2,table1,table2中各有两个字段f1,f2.table1表中的f2字段是空的,table2表中的f2字段有值的.
我问题是当table1表的f1等于table2表的f1时,那么就把table2表的f2值填到相应的table1表中的f2字段里。
怎么写个语句,我的是access数据库,我像如下写,
update table1
set f2=B.f2
from table1 A,table2 B.
where A.f1=B.f2
报"语法错误(操作符丢失)在查询表达式'B.f2 form table1 A'中"