匹配不含有某个信息的sql语句写法
SELECT id,order_id,flight_info FROM order_flights WHERE mark=0 AND flight_info REGEXP '[^() DAY)]' ORDER BY id DESC LIMIT 1;
????????????
逻辑比较复杂的sql语句如下:
SELECT
id,
order_id,
flight_info
FROM
order_flights
WHERE mark = 0
AND flight_info NOT REGEXP 'DAY [2-8]'
AND flight_info REGEXP 'DAY 1'
AND order_id >0
ORDER BY id DESC
LIMIT 5;
继续寻找比较简单的sql语句: