SQL - SOME - ANY 
Author Message
 SQL - SOME - ANY
Hi,
can anybody tell me the difference between SOME and ANY in a query ?

e.g.
select col1
from tab1
where
10>any(col1, col2);

select col1
from tab1
where
10>some(col1, col2);

reg Kai



Wed, 18 Jun 1902 08:00:00 GMT
 SQL - SOME - ANY

There isn't supposed to be any.

Check the SQL Reference manual: Comparison Operators -
ca. page 3-6, table ca. 3-4.

    = ANY
    = SOME
    IN

are supposed to be synonymous,
although your example with > ANY / > SOME
seems to have an optimiser option available
that is not available to = ANY/ = SOME / IN

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk


Quote:
>can anybody tell me the difference between SOME and ANY in a query ?

>select col1
>from tab1
>where
>10>any(col1, col2);

>select col1
>from tab1
>where
>10>some(col1, col2);



Wed, 18 Jun 1902 08:00:00 GMT
 SQL - SOME - ANY
There is no difference. SOME is a synonym for ANY.



Quote:
> Hi,
> can anybody tell me the difference between SOME and ANY in a query ?

> e.g.
> select col1
> from tab1
> where
> 10>any(col1, col2);

> select col1
> from tab1
> where
> 10>some(col1, col2);

> reg Kai



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. MS Access 97 SQL to MS SQL SQL SQL SQL

2. SQL-92, Migrate PL/SQL at ORACLE into PL/SQL at SQL Server 7.0

3. SQL 6.5 vs. SQL 7.0 or SQL 2000

4. Translating FoxPro SQL into SQL Server SQL

5. SQL-DMO Problem in T-SQL in SQL Server 7 with SP3

6. ERROR: Must Update SQL EM and SQL-DMO to SQL Svr 2000

7. Connecting to Sql Server from asp after upgrade from ms sql 7 to ms sql 2000

8. US-TX-DFW SQL SERVER DBA - SQL SERVER DATABASE ADMINISTRATOR - SQL DBA

9. from oracle (pl/sql) to sql server (t-sql)

10. Differences between SQL 7 And SQL 2K T-SQL

11. SQL-DMO: Inconsistency between SQL 7 and SQL 2000

12. Transforming Access 2002 SQL to SQL-Server 2000 SQL


 
Powered by phpBB® Forum Software