title: How to get the output of a query run on database
body: <p>When we execute the query, we can see the error messages with the help of </p>
  
  <pre><code>print OUT "$DBI::errstr";
  </code></pre>
  
  <p>But how can we get the result of the query on successful execution, like </p>
  
  <pre><code>table TRN_STLMNT_ created
  </code></pre>