对于这个问题的第二部分已经有很长一段时间了,我想知道,我做错了什么。问题是:
使用任何有效数据将新记录插入到成员表中,并更新xrefartistsmembers以使该人成为Sonata的成员。
我能够让第一部分没问题,并且能够将以下内容插入成员
INSERT INTO Members (MemberID, FirstName, LastName, Address, City, Region, PostalCode, Country, HomePhone, WorkPhone, EMail, Gender, Birthday, SalesID)
VALUES (39, "John", "Smith", "449 S Hobart Blvd", "Los Angeles", "CA", 90025, "USA", 3235912274, 3103792865, NULL, "M", "1980-02-12", 4)
现在当我尝试做第二部分时,我不断变化。我在附近,还是我远离?
UPDATE Xrefartistsmembers X, Members M, Artists A
SET M.MemberID = 5
WHERE M.MemberID = X.MemberID
AND A.ArtistID = X.ArtistID
AND Artistname = "Sonata"
AND M.Firstname = "John"