Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Hi when do you use ANY,SOME, ALL

Hi when do you use ANY,SOME, ALL

From: Juan Carlos Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Fri, 25 Jun 2004 17:39:33 -0400
Message-Id: <40DC9B95.00001B.01204@CACHITOSS>


Hi List,
I don't understand when one must use ANY, SOME or ALL I don't understand the use of the use of this optoins I suppose they were added only to give more SQL ansi compatibility    

SELECT USR_NOMSIS FROM UTL_USUARIO_SIS WHERE PER_CI = ALL (SELECT -2354 FROM UTL_USUARIO_SIS WHERE 1=0)
ORDER BY 1
ANY
SOME
Compares a value to each value in
a list or returned by a query. Must
be preceded by =, !=, >, <, <=, >=.
Evaluates to FALSE if the query
returns no rows.
SELECT * FROM employees
WHERE salary = ANY
(SELECT salary
FROM employees
WHERE department_id = 30);
ALL Compares a value to every value
in a list or returned by a query.
Must be preceded by =, !=, >, <,
<=, >=.

Evaluates to TRUE if the query
returns no rows.
SELECT * FROM employees
WHERE salary >=
ALL ( 1400, 3000);  



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Jun 25 2004 - 16:40:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US