I want retrieve the id of a inserted row in the database, but I don’t know how to do this.
I tried to return using the SQL clause RETURNING id, but not works.
How I can return the id after the insertion of a row?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After calling the
execute()method on the Prepared Statement, the id of the insert row will be in theinsert_idattribute.