Because these functions are rarely used, they are almost forgotten. However, they are useful for greatly simplifying some SQL syntax. As for efficiency problems,
As CCW said, they have no difference with EXISTS, IN, and so on, and need to analyze the specific problem
Among them, ANY and SOME care about the same,
They can replace each other.
Here are a few examples to illustrate the usage of ALL and ANY.
1. SELECT * from tablea where region> ALL (SELECT region from tablea)
This is equivalent
SELECT * from tablea where distinct> (select max (distinct) from tablea)
2. SELECT * from tablea where region> ANY (SELECT region from tablea)
This is equivalent
SELECT * from tablea where distinct> (select min (distinct) from tablea)
3. SELECT * from tablea where region = ANY (SELECT region from tablea)
This is equivalent
SELECT * from tablea where distinct IN (SELECT distinct from tablea)
Finally, HAVING is an operator used for aggregate computing. It has different meanings from WHERE.
HAVING is used to compare the records in each GROUP,
In other words, it is a condition for selecting a group of data.
The WHERE clause is irrelevant to the group. It is a condition for selecting a row of data.
For example,
Select name, AVG (PRICE) from store group by name having avg (PRICE)> 10
HAVING here cannot be replaced by WHERE.
As for efficiency, WHERE is the process completed before the result set is generated,
HAVING has to wait until the result set is made and then process it cyclically, which is less efficient. Therefore, HAVING is not recommended when you only need to perform operations on rows.