title: Execute query only if it is select statement. How?
body: <pre><code>string sqlQuery = "unknown";
  </code></pre>
  
  <p>I need to write a function which receives a sql query as parameter e.g. <code>sqlQuery</code>. I would like to execute it only if it is select statement and return data. In other case, if parameter <code>sqlQuery</code> contains delete, update or truncate, the function should return null.</p>
  
  <p>I wonder if there is way to achieve this without parsing contents of parameter <code>sqlQuery</code>. 
  I would like to do this using c sharp for oracle queries. </p>
  
  <p>Any tips. Thanks.</p>
  
  <p>Update:</p>
  
  <ol>
  <li>This should work for all kinds of users with all privileges.</li>
  </ol>