MySQL Forums
Forum List  »  Connector/Node.js

Re: SqlResult does not have getLastInsertId()
Posted by: Rui Quelhas
Date: January 25, 2023 09:25AM

Hi Seongjoo Lee,

you are right. The user guide is outdated with regards to the result set API (I'll try to get it fixed).

In the scope of an SQL statement result set, the "id" is basically the value of an PRIMARY KEY AUTO INCREMENT column, if there is one.

So, there is a "getAutoIncrementValue()" (, which returns just that value.

Hope it helps.


Options: ReplyQuote

Written By
Re: SqlResult does not have getLastInsertId()
January 25, 2023 09:25AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.