[英]How to get the output of a sql count query using ibatis?
How can I get count of record from a particular column. 如何从特定列获取记录计数。
getSqlMapClientTemplate().queryForObject(IS_EXIST_RECORD_ASSIGNMENT_TRANS_MASTER_TABLE, reportId);
The query I have used is as follows 我使用的查询如下
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#
resultClass declaration is mandatory. resultClass声明是强制性的。 Below is the reference for the alias available for Java types ALias reference for IBatis
以下是可用于Java类型的别名的参考ALias对于IBatis的参考
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.