我已经在MySQL中编写了一个查询,并在MySQL Workbench中正常工作,但是当我使用Node.js在Lambda Function中运行该查询时,会出错
ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select @userId;\n insert into Favourite_Contacts (ContactId, UserId)' at line 3",
这是查询
SELECT usertable.userid
INTO @userId
FROM usertable
WHERE usertable.username = ?;
SELECT @userId;
INSERT INTO favourite_contacts
(contactid,
userid)
VALUES (?,
@userId)
可能是个问题吗??