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