Sung Sung - 2 months ago 4x
SQL Question

TSQL - SOME | ANY why are they same with different names?

According to MSDN BOL (Books Online) description on SOME | ANY (Transact-SQL),

SOME and ANY are equivalent.

It does make sense to use either SOME | ANY to make a query more readable.

But is that the only reason why there are 2 keywords in TSQL where they serve the exactly the same purpose?

Are there any historic reasons why they have the same functionality?

gbn gbn

From the ANSI-92 SQL Standard (search for "SOME"). Also here, text

<some> ::= SOME | ANY

I suspect the reason is that SQL language comes from the early 1970s, but had no standard until 1986. The standard would have taken elements of the existing SQL dialects, so we have this SOME/ANY anomaly.

This blog article by Brad Schulz explains some differences: "ALL, ANY, and SOME: The Three Stooges"