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

后端 未结 5 451
滥情空心
滥情空心 2021-01-07 20:19

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

SOME and ANY are equivalent.

It does make sense t

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 21:05

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

    I'll answer the actual question... At the beginning it was just ALL and ANY.

    ALL is an universal quantifier, while ANY was supposed to always be an existential quantifier. However, in English, ANY is frequently used as an universal quantifier as well. "I can beat ANY of you" is not synonym of "I can beat SOME of you". It's in fact synonym of "I can beat ALL of you".

    With ANY being confusing, SOME has been introduced as a more reliable synonym for ANY with the adoption of the SQL-92 standard. ANY was supposed to be retained for a while just for backward compatibility with previous product versions. But we still have it today.

提交回复
热议问题