Skip to content

AND, OR, NOT · ⁨AND、OR、NOT⁩

English

Combining conditions

A WHERE clause can test more than one thing at once. Join conditions with:

  • AND — both must be true
  • OR — at least one must be true
  • NOT — flips a condition

This returns 11A students who also scored above 88.

中文

组合条件

一个 WHERE 子句可以同时测试不止一件事。用下面的词连接条件:

  • AND —— 两个都必须为真
  • OR —— 至少一个为真
  • NOT —— 把条件反过来
SELECT name FROM student WHERE form = '11A' AND score > 88;

这会返回那些 11A 班、并且分数高于 88 的学生。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩