我这里有两张桌子。
表1:
**ID** **Color** **Description**
1 red It's red`
2 blue yeah
3 blue blue
表2:
**ID** **Family**
1 family1
2 family1
3 family2
所以我想解散表2,只需将Family
列添加到表格的末尾1.简单,对吧?所以我在table1和
UPDATE table1
SET Table1.family = table2.family
FROM
table1 INNER JOIN table2
ON table1.ID = table2.id;
我得到Syntax Error : Missing operator
。这不是这些类型的查询的语法吗?
答案 0 :(得分:3)
联接更新的MS-Access语法如下:
UPDATE table1 INNER JOIN table2
ON table1.ID = table2.id
SET table1.family = table2.family
答案 1 :(得分:1)
您使用的语法错误:
UPDATE table1 INNER JOIN table2
ON table1.ID = table2.id
SET Table1.family = table2.family;
答案 2 :(得分:1)
试试这个:
UPDATE table1 INNER JOIN table2 ON table1.id = table2.id
SET table1.family = table2.family;