Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理 Access 2007 中的两个表,下面的查询导致零记录。我想将客户 ID 复制到事务表中。
INSERT INTO Transactions (NAME_ID) SELECT ID FROM Clients WHERE not exists (select * from Transactions where Transactions.Name=Clients.Name);
提前谢谢你,巴里
您需要 UPDATE 查询,而不是 INSERT
UPDATE clients INNER JOIN transactions ON clients.Name = transactions.Name SET transactions.Name_ID = [clients].[ID];
UPDATE 之后的部分定义表之间的连接 SET 之后的部分定义要更新的项目