1. 比较条件:
SELECT * FROM your_table WHERE column1 > 100;
2. 逻辑条件:
SELECT * FROM your_table WHERE column1 > 100 AND column2 = 'value';
3. IN条件:
SELECT * FROM your_table WHERE column1 IN (1, 2, 3);
4. BETWEEN条件:
SELECT * FROM your_table WHERE column1 BETWEEN 50 AND 100;
5. LIKE条件(模糊查询):
SELECT * FROM your_table WHERE column1 LIKE 'prefix%';
6. NULL值条件:
SELECT * FROM your_table WHERE column1 IS NULL;
7. 存在性条件:
SELECT * FROM your_table WHERE EXISTS (SELECT * FROM another_table WHERE another_table.id = your_table.id);
这些条件语句允许你根据特定的条件对数据进行过滤或者进行逻辑判断。条件通常用于SELECT、UPDATE、DELETE等SQL语句的WHERE子句中。你可以根据实际需求组合这些条件,以满足查询的要求。
转载请注明出处:http://www.pingtaimeng.com/article/detail/11727/OceanBase