查询员工是否有入职满三年 sql

<select id="selctBeanInfo" resultType="com.cn.UserInfo"
            parameterType="java.lang.Integer">
        select *
        from user_info
        where status = 0
        and TIMESTAMPDIFF(DAY,date_add(add_time, interval 3 YEAR),NOW())>= 0
    </select>

  

posted @ 2021-09-30 08:45  红尘沙漏  阅读(333)  评论(0编辑  收藏  举报