oracle通过时间查询

来源:互联网 发布:c#foreach遍历数组 编辑:程序博客网 时间:2024/06/05 17:03

数据库:

select CheckDateTime ,count(*)
        from DAILYCHECKRESULT 
       where CheckDateTime=TO_DATE('2017/11/9','YYYY-MM-DD')
       group by CheckDateTime

mybatis:

<resultMap id="getDate"   type="HashMap">  
    <result property="key" column="CheckDateTime" />  
    <result property="value" column="count(*)" />  
</resultMap> 
<select id="findByDate" parameterType="String" resultMap="getDate">
select CheckDateTime ,count(*)
        from DAILYCHECKRESULT 
      where CheckDateTime=TO_DATE(#{date},'YYYY-MM-DD')
        group by CheckDateTime
</select>


原创粉丝点击