-
非等连接在SQL语言中的基础知识
资源介绍
非等连接
*
EMP
SALGRADE
EMPNO ENAME SAL
------ ------- ------
7839 KING 5000
7698 BLAKE 2850
7782 CLARK 2450
7566 JONES 2975
7654 MARTIN 1250
7499 ALLEN 1600
7844 TURNER 1500
7900 JAMES 950
...
14 rows selected.
GRADE LOSAL HISAL
----- ----- ------
1 700 1200
2 1201 1400
3 1401 2000
4 2001 3000
5 3001 9999
“在EMP表中,如何查出在
SALGRADE表所示的每个
工资段中的员工号码?”
*
Non-Equijoins
The relationship between the EMP table and the SALGRADE table is a non-equijoin, meaning that no column in the EMP table corresponds directly to a column in the SALGRADE table. The relationship between the two tables is that the SAL column in the EMP table is between the LOSAL and HISAL column of the SALGRADE table. The relationship is obtained using an operator other than equal (=).
- 上一篇: 根据多个列进行分组-SQL语言基础
- 下一篇: 分组函数的误用-SQL语言基础