How to return the number of affected rows in a HANA stored procedure? How to return the number of affected rows in a HANA stored procedure? sql sql

How to return the number of affected rows in a HANA stored procedure?


Not trying to steal internet points, but this should have an answer that's not just in the description of the question. To select row count, use the following:

SELECT ::ROWCOUNT INTO someVariable FROM DUMMY;

DUMMY is a special keyword in HANA and is used to select variables vs selecting from a table. You cannot simply SELECT ::ROWCOUNT INTO someVariable in HANA.


Isn't there a problem with ::ROWCOUNT since it is a system variable, so using it by several sessions simultaneously could produce incorrect results?