我有一个名为Inventory的表。我有一个名为Sales的第二个表。在进行销售时,我想将库存商品中商品的状态更改为"已售出。"此SQL查询不起作用,并且与销售表单上的按钮绑定:
UPDATE Inventory
INNER JOIN Sales ON Inventory.[Vehicle ID] = Sales.[VehicleID]
SET Inventory.[Vehicle Status] = "SOLD"
WHERE Inventory.[Vehicle ID] = Sales.[VehicleID]
答案 0 :(得分:0)
MS ACCESS的正确格式是
UPDATE Inventory
INNER JOIN Sales ON Inventory.[Vehicle ID] = Sales.[VehicleID]
SET Inventory.[Vehicle Status] = "SOLD";
正确的SQL格式是:
UPDATE Inventory
SET [Vehicle Status] = "SOLD"
FROM Inventory
INNER JOIN Sales ON Inventory.[Vehicle ID] = Sales.[VehicleID]
如果这些sql语句不起作用,则vehicle Id
可能与表中的EditText edit = (EditText) view.findViewById("myEditText");
String city = edit.getText().toString();
不相同或缺失