SELECT ALL... in Oracle SQL

Viewed 13618

I was researching packages from DB, when I saw following query:

SELECT ALL TABLE1.CODE, nvl(TABLE1.EXPLANATION, '') as Explanation 
FROM TABLE1;

I couldn't find what is the usage of ALL in SELECT statement, I know that using ALL in WHERE has meaning of AND.

Could you please clear this out for me?

2 Answers

A bit late, but I would like to remark somthing on this topic: Yes, its right that it is the standard for select statements but it makes a difference for other functions e.g. "count":

count (all <col>) 

ignores NULL values, whereas

count (<col>) 

includes NULL values.

[Remark: ORACLE SQL, see https://www.oracletutorial.com/oracle-aggregate-functions/oracle-count/]

Related