title: SELECT @@ROWCOUNT Oracle equivalent
body: <p>I have an application for query management. Previously I was using SQL Server database, and to get the number of affected rows by a query I used to do:</p>
  
  <p><code>SELECT * FROM TABLE</code> (or any other select query)</p>
  
  <p>and then I do <code>SELECT @@ROWCOUNT</code> to get the number of rows affected by the last executed query.</p>
  
  <p>I have read about <code>SQL%ROWCOUNT</code>, but I am not able to make it work in a SELECT statement</p>
  
  <p>Is there any way to do this in a Oracle database?. Thank you!</p>
  
  <p>Edited:</p>
  
  <p>I have solved this by doing <code>SELECT COUNT(*) FROM (QUERY)</code> to get the number of rows affected by the query, I discarted this approach because it was not working in SQL Server if the query contains an <code>ORDER BY</code> clause.</p>