标签:arch end oracle string scope 时间 result col idt
活动类型默认是1,代表邀请好友
select * from t_invite_activityinfo t
where sysdate >= t.begintime and sysdate<=t.endtime and ACTIVITYTYPE = 1
在mybatis里面的写法;
1 <select id="getActivityId" resultType="string" parameterType="java.lang.String"> 2 SELECT activityId FROM t_invite_activityinfo t 3 WHERE sysdate >= t.beginTime 4 AND sydate < = t.endTime 5 AND t.activityType = #{activityType,jdbcType=VARCHAR} 6 </select>
其中>=和<=是>=和<=的转义符;
以下转义符:
原符号 | < | <= | > | >= | & | ‘ | " |
替换符号 | < | <= | > | >= | & | ' | " |
标签:arch end oracle string scope 时间 result col idt
原文地址:https://www.cnblogs.com/zhang-yawei/p/10000989.html