I must convert some stored procedures from MS Sql Server to MySQL

and in Sql Server I have these two variables:

  • @@ERROR for a server error and
  • @@IDENTITY for the last insert id

are there MySql similar global variables?


You may get last insert id by

select LAST_INSERT_ID();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.