目录
一、关系运算: ........................................................................................................ 4
1. 等值比较: =.................................................................................................... 4
2. 不等值比较: <> .............................................................................................. 4
3. 小于比较: <.................................................................................................... 4
4. 小于等于比较: <= ........................................................................................... 4
5. 大于比较: >.................................................................................................... 5
6. 大于等于比较: >= ........................................................................................... 5
7. 空值判断: IS NULL........................................................................................... 5
8. 非空判断: IS NOT NULL .................................................................................... 6
9. LIKE 比较: LIKE ................................................................................................. 6
10. JAVA 的 LIKE 操作: RLIKE ................................................................................. 6
11. REGEXP 操作: REGEXP..................................................................................... 7
二、数学运算: ........................................................................................................ 7
1. 加法操作: +.................................................................................................... 7
2. 减法操作: - .................................................................................................... 7
3. 乘法操作: *.................................................................................................... 8
4. 除法操作: / .................................................................................................... 8
5. 取余操作: % ................................................................................................... 8
6. 位与操作: & ................................................................................................... 9
7. 位或操作: | .................................................................................................... 9
8. 位异或操作: ^ ................................................................................................ 9
9.位取反操作: ~ ............................................................................................. 10
三、逻辑运算: ...................................................................................................... 10
1. 逻辑与操作: AND.......................................................................................... 10
2. 逻辑或操作: OR ............................................................................................ 10
3. 逻辑非操作: NOT .......................................................................................... 10
四、数值计算.......................................................................................................... 11
1. 取整函数: round ........................................................................................... 11
2. 指定精度取整函数: round ............................................................................. 11
3. 向下取整函数: floor...................................................................................... 11
4. 向上取整函数: ceil........................................................................................ 12
5. 向上取整函数: ceiling ................................................................................... 12
6. 取随机数函数: rand ...................................................................................... 12
7. 自然指数函数: exp ....................................................................................... 13
8. 以 10 为底对数函数: log10 ............................................................................ 13
9. 以 2 为底对数函数: log2 ............................................................................... 13
10. 对数函数: log ............................................................................................. 13
11. 幂运算函数: pow ........................................................................................ 14
12. 幂运算函数: power ..................................................................................... 14
13. 开平方函数: sqrt......................................................................................... 14
14. 二进制函数: bin.......................................................................................... 14