我在phpMyAdmin中存储新程序时出错。我试图将此代码(使用MySQL)作为新程序插入:
UPDATE a
SET a.firstname = b.firstname,
a.lastname = b.lastname,
a.sex = b.sex
FROM stagingtable b
JOIN tbl_syncList a ON a.idcolumn = b.idcolumn
WHERE b.timestamp > a.timestamp
INSERT tbl_syncList(firstname, lastname, sex, dateOfBirth, email)
SELECT
b.firstname,
b.lastname,
b.sex,
b.dateOfBirth,
b.email
FROM stagingtable b
LEFT JOIN tbl_syncList a ON a.idcolumn = b.idcolumn
WHERE a.idcolumn IS NULL
我收到此错误:#1064,synthax错误,检查在“FROM stagingtable b”附近使用的synthax手册 JOIN tbl_syncList a ON a.idcolumn = b.idcolumn WHERE(等)......第5行
任何想法有什么不对?非常感谢你的帮助!