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?

1 Answer 1


You may get last insert id by

select LAST_INSERT_ID();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .