oracle之 any、some、all 解析

举几个例子来说明ALL和ANY的用法

1. SELECT * FROM TABLEA WHERE FLD > ALL(SELECT FLD FROM TABLEA) 这相当于 SELECT * FROM TABLEA WHERE FLD > (SELECT MAX(FLD) FROM TABLEA)

2. SELECT * FROM TABLEA WHERE FLD > ANY(SELECT FLD FROM TABLEA) 这相当于 SELECT * FROM TABLEA WHERE FLD > (SELECT MIN(FLD) FROM TABLEA)

3. SELECT * FROM TABLEA WHERE FLD = ANY(SELECT FLD FROM TABLEA) 这相当于 SELECT * FROM TABLEA WHERE FLD IN (SELECT FLD FROM TABLEA)

上一篇:一:使用maven构建项目


下一篇:Django——Ajax