关系代数运算符           对应sql语句
聚合操作  
 (UNION)  
 (INTERSECTION)  
-  (DIFFERENCE)差  
× (Cartesian PRODUCT)笛卡尔积     from
纯关系操作  
π (PROJECT)投影           select
σ (SELECT)选择            where
⋈ (JOIN)链接   JOIN(mysql> SELECT a.age, b.author FROM books a INNER JOIN books2 b ON a.age>25;)
÷ (DIVISION)除  exists 和not exists(select * from books A where not exists(select age from books8 B WHERE A.age=B.age);)
   
> 大于  
>=大于等于  
< 小于  
<=小于等于  
等于  
!=不等于  
∧ 与  
∨ 或  
¬ 非  
between          在两个值范围内查找  
like                按通配符查找  
regexp            按正则表达式查找  
组合条件 and, or
 select * from table_name where coll = xxx and col2 = xx or col3 > x;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2021-06-07
  • 2021-10-19
  • 2021-06-19
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
相关资源
相似解决方案