SQL - Structured Query Language

ALL Operator



ALL operator is used to compares a set of scalar values with a single-column set of values. The following query return FALSE because 30 is not less than all of the values in the EMP table.

-- Example 46 --

 

SELECT * FROM EMP

 

IF 30 < ALL (SELECT DISTINCT (Dept_Code) FROM EMP)

PRINT 'TRUE'

ELSE

PRINT 'FALSE'


Query Output Screen

* * * * *


Email Your Comment To AUTHOR