Loading

sql 关键字

1.STR_TO_DATE

查询预约时间是未来的:

AND STR_TO_DATE(c.changci_date, '%Y-%m-%d') >= now()

2.instr:

连接条件是预约id中含有场次id的

LEFT JOIN cul_site_changci c ON INSTR(cul_site_order.changci_id,c.id)

where 后的条件是审核状态为02的

AND INSTR(#{checkStatus,jdbcType=VARCHAR},cul_site_order.check_status)

3.

SELECT FIND_IN_SET('b','a,b,c,d'); //返回值为2,即第2个值

select instr('helloworld','lo') from dual; --返回结果:4 即“lo”同时(连续)出现,“l”的位置

posted @ 2020-01-10 17:43  风萧萧5  阅读(83)  评论(0编辑  收藏  举报