SQL每日一题(20211217)
SQL每日一题(20220630)
SELECT *
FROM T0108
WHERE B NOT LIKE concat('%',A,'%')
OR B IS NULL
SELECT T.A, T.B
FROM T0108 T
WHERE T.A IN
(
SELECT REGEXP_SUBSTR(NVL(T.B, 0), '[^,]', 1, LEVEL) FROM DUAL CONNECT BY LEVEL <= REGEXP_COUNT(T.B, ',') + 1);
SELECT *,FIND_IN_SET(`A`,`B`) FROM `t0108` WHERE IFNULL(FIND_IN_SET(`A`,`B`),0) = 0;