Oracle学习笔记04:timestamp时间大小比较


Oracle学习笔记04:timestamp时间大小比较

 

Oracel时间比较和Mysql不太一样,一开始还折腾了下

其中一种方式如下:

        select
            a.*,
            b."name" as "maintain_sup_type_name"
        from S_MAINTAIN_ORDER a
        LEFT JOIN S_MAINTAIN_CATEGORY b on b."id" = a."maintain_sup_type"
        where a."del_flag"=0
        <if test="orderCode != null and orderCode != ''">
            and  a."order_code" like concat(concat('%',#{orderCode}),'%')
        </if>
        <if test="appointTimeStart != null "> and "TO_CHAR"(a."appoint_time_start",'yyyy-mm-dd' ) &gt; #{appointTimeStart} </if>
        <if test="appointTimeEnd != null"> and "TO_CHAR"(a."appoint_time_end",'yyyy-mm-dd' ) &lt; #{appointTimeEnd} </if>
        <if test="maintainSupType != null and maintainSupType != ''">
            and  a."maintain_sup_type" = #{maintainSupType}
        </if>
        <if test="orderStatus != null">
            and  a."order_status" = #{orderStatus}
        </if>
        <if test="memberMobile != null and memberMobile != ''">
            and a."member_mobile" like concat(concat('%',#{memberMobile}),'%')
        </if>
        order by a."order_code" desc

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM