* Some here to satisfy one of the meanings, is to use or string up the comparative clauses.
* Any also means satisfying one of the meanings, is also the use of or string up the comparative clauses, the difference is that any is generally used in the non-"=" of the comparative relationship, which is also very good understanding, the use of any affirmative sentence in the English use some, this is the same.
* All means satisfying all of its query results, using and strings of comparative clauses.
Any
Nested queries with "any" and nested queries for "some" are the same. Earlier SQL allowed only "any", and later versions, in order to distinguish it from the English "any", introduced "some" and retained the "any" keyword.
Any
Select Emp.empno,emp.ename,emp.job,emp.sal from scott.emp where Sal >any (select Sal from scott.emp where job= ' Manag ER ');
The query process with any is equivalent to the two-step execution process.
(1) Execute "Select Sal from Scott.emp where job= ' manager '"
Select Emp.empno,emp.ename,emp.job,emp.sal from scott.emp where Sal >2975 or sal>2850 or sal>2450;
Some
Some
Select Emp.empno,emp.ename,emp.job,emp.sal from scott.emp where Sal =some (select Sal from scott.emp where job= ' MANAGER ‘);
The nested query with some is the same as the step for any.
(1) Sub-query, execute "Select Sal from scott.emp where job= ' MANAGER '", as shown in result 4.22.
(2) The parent query executes the following statement.
―――――――――――――――――――――――――――――――――――――
Select Emp.empno,emp.ename,emp.job,emp.sal from scott.emp where Sal =2975 or sal=2850 or sal=2450;
All
All is a query, or it can be a subquery
Such as:
Select name from edit
Where name is omitted before all.
All| can be added before name DISTINCT
All is all records.
The distinct is not repeated.
Any,some,all usage in Oracle in Oracle