Hi all,
Likewise in SQL Server, after every transaction, an error number is set to the global variable @@ERROR. So we easily make a check in SQL SERVER stored procedure,
IF @@ERROR = 0
SELECT 'SUCCESS'
ELSE
SELECT 'FAIL'
How can I do the similar thing in MySQL. How can I get the Error number or Error Code in mySQL, so that I can implement the same if check in mySQL Stored Procedure.
Basically I am transforming SQL Server 2008 database to MySQL database and stored procedures with same functionality.
I am looking forward a very helpful answer from you guys and it will be highly appreciated.
Thanks.