IN

SQL IN 操作符

August 20, 2022
Sql, IN

SQL IN 操作符 # IN 操作符 # IN 操作符允许您在 WHERE 子句中规定多个值。 SQL IN 语法 # SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,...); IN 操作符实例 # 下面的 SQL 语句选取 icp 为 “google” 或 “dnspod.cn” 的所有网站: MariaDB [learnsql]> select * from domains where icp in ('google','dnspod.cn'); +----+-----------+--------------+------------+------------+ | ID | ICP | DomainName | RegDate | EndDate | +----+-----------+--------------+------------+------------+ | 22 | google | suopo.net | 2020/6/17 | 2023/6/17 | | 43 | dnspod. ...