SQL|你用过NOT BETWEEN吗?

SQL|你用过NOT BETWEEN吗?_第1张图片
image.png

如需显示不在上面实例范围内的网站,请使用 NOT BETWEEN:

SELECT * FROM Websites
WHERE alexa NOT BETWEEN 1 AND 20;

结果

SQL|你用过NOT BETWEEN吗?_第2张图片
image.png

BETWEEN 操作符

选取介于两个值之间的数据范围内的值。这些值可以是数值、文本或者日期。

BETWEEN 语法

SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;

你可能感兴趣的:(SQL|你用过NOT BETWEEN吗?)