How does one return the number of rows affected from an insert or update statement while inside a SAP HANA stored procedure?
In oracle one would use sql%rowcount but I can't find an equivalent for HANA in their documentation?
For example:
CREATE PROCEDURE procedure_name (p_input)
LANGUAGE SQLSCRIPT AS
BEGIN
define c integer;
insert into some_table values (somevalues);
c := sql%rowcount;
END
UPDATE:
I found the answer on an SAP thread finally. You can run this statement after the insert or update to get the rowcount:
SELECT ::ROWCOUNT into L_C FROM DUMMY;