SQL - Structured Query Language

ANY or SOME Operator



ANY or SOME operator is used to compare a set of scalar values with a single-column set of values. The following query returns TRUE because 30 is less than some of the values in the EMP table.

-- Example 47 --

 

SELECT * FROM EMP

 

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

PRINT 'TRUE'

ELSE

PRINT 'FALSE'


Query Output Screen



* * * * *


Email Your Comment To AUTHOR