TSQL - 一些 |ANY 为什么它们相同但名称不同? [英] TSQL - SOME | ANY why are they same with different names?

查看:34
本文介绍了TSQL - 一些 |ANY 为什么它们相同但名称不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 SOME |上的 MSDN BOL(联机丛书)描述任何 (Transact-SQL),

SOME 和 ANY 是等价的.

SOME and ANY are equivalent.

使用 SOME | 确实有意义ANY 使查询更具可读性.

但是唯一的原因,为什么TSQL中有2个关键字的作用完全相同?

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?

推荐答案

来自 ANSI-92 SQL 标准(搜索SOME").也在这里,文本

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

<some> ::= SOME | ANY

我怀疑原因是 SQL 语言来自 1970 年代早期,但直到 1986 年才有标准.该标准会采用现有 SQL 方言的元素,所以我们有这个 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"

这篇关于TSQL - 一些 |ANY 为什么它们相同但名称不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆