I would like to make a Stored procedure in MySQL with an try/catch to prevent the error going to my java project. But since there is no try/catch in MySQL im searching for alternatives.
The only thing i need to prevent, is to dont get a “Duplicate key” error from mysql in my java project. If i get this error, i dont want to show anything and act like it has inserted normal.
Is this possible?
Why don’t you catch this error withi your application?
Anyway, from docs: http://dev.mysql.com/doc/refman/5.5/en/insert.html
.