title: How to get the output of a sql count query using ibatis?
body: <p>How can I get count of record from a particular column.</p>
  
  <pre><code>getSqlMapClientTemplate().queryForObject(IS_EXIST_RECORD_ASSIGNMENT_TRANS_MASTER_TABLE, reportId); 
  </code></pre>
  
  <p>The query I have used is as follows  </p>
  
  <pre><code>SELECT Count(report_id) 
  FROM   (SELECT report_id 
          FROM   m_assign_reports 
          UNION 
          SELECT report_id 
          FROM   m_assign_reports_trans) 
  WHERE  report_id = #reportid# 
  </code></pre>