cancel
Showing results for 
Search instead for 
Did you mean: 

Exit Handler in HANA XSA

former_member597564
Participant
0 Kudos

I have written one stored procedure in hana xsa where i have written INSERT statement to insert data into Tables.

Suppose i am trying to insert duplicate entry into table then it should throw an error

other wise it should throw a SUCCESS message.

How to do this in HANA Procedures?

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

In case a unique constraint is violated by your insert statement, the database raises an error (code 301 as you can see here). So by registering an exit handler (as described here) you can react on that error code and do whatever you wanna do.

Answers (0)