|
逻辑运算符 |
意义 |
| and | 双值运算符,如果左右两个条件都为真,则得到的值就为真 |
| or | 双值运算符,只要左右两个条件有一个为真,则得到的值就为真 |
| not | 单指运算符,如果原条件为真,则得到真,如果元条件为假,反之如果原条件为假,则结果为真 |
Select * from emp where sal > 2000 and job = ‘SALESMAN';
Select * from emp where job = ‘CLERK' or deptno = 20;
Select * from emp where not (sal > 3000 or sal < 1500);
|
运算符 |
级别 |
| 算术运算符(即‘+',‘-',‘*',‘/') | 1 |
| 连接运算符(即‘||') | 2 |
| 比较运算符(即‘>',‘>=',‘<',‘<=',‘<>') | 3 |
| Is [not] null,[not] like,[not] in | 4 |
| [not] between-and | 5 |
| not | 6 |
| and | |
| or |
Select * from emp where sal < 1500 or sal >= 2000 and job = ‘ANALYST';
Select * from emp where sal < 1500 or (sal >= 2000 and job = ‘ANALYST');
Select * from emp where (sal < 1500 or sal >= 2000) and job = ‘ANALYST';
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有