我有下面的查询。 我的目的是以某种方式排除4到14之间的条目而不显示它们。
SELECT code, register, data
FROM code
WHERE code
BETWEEN 4
AND 14
ORDER BY code
答案 0 :(得分:5)
在列NOT
之后使用code
。
SELECT code, register, data
FROM code
WHERE code NOT
BETWEEN 4
AND 14
ORDER BY code;
或者您也可以在列code
SELECT code, register, data
FROM code
WHERE NOT code
BETWEEN 4
AND 14
ORDER BY code;