- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我需要有关查询部分的一些“术语”方面的帮助。但不仅查询PARTS,任何“查询相关修辞格”也会很有帮助,我对它们很感兴趣。不仅关于 SELECT
s(如下例所示),INSERT
小号,UPDATE
s 和其他查询。
例如:
SELECT t1.f1, t1.f2, t2.f1 AS f1a, (t2.f2 * 10) AS f2a
FROM talbe1 AS t1
INNER JOIN table2 AS t2 ON (t1.f4 <> t2.f4)
WHERE t1.f3 > t2.f3
LIMIT 100, 9999
我知道:
1) t1, t2
- “表别名”,这里没有错误吗?
2) f1a
- “字段别名”,f2a
- idk ...也许是“表达式别名”?它们之间有区别吗?有集体命名吗?
3) 100
- “偏移量”
我不确定如何调用:
1) 所有在 SELECT
之间和 FROM
: t1.f1, t1.f2, t2.f1 AS f1a, (t2.f2 * 10) AS f2a
2) t1.f3 > t2.f3
“哪里条款”? “健康)状况”?哪个更好?其他变体?
3) (t1.f4 <> t2.f4)
“加入条件”?
如果有超过 1 个连接,我也很感兴趣,我可以通过“顺序”或“深度”以某种方式调用它们吗?如果我可以通过“深度”做到这一点,那么 RIGHT JOIN
会怎样? ?
任何其他有趣的“事物命名”以及您的示例都会非常有帮助。像 SELF-JOIN 一样,可能是其他一些有特殊调用的连接,任何你能记住的有趣的东西。
最佳答案
您可能对 the official MySQL syntax 感兴趣不得不说这件事。在我看来,当你试图描述像编程语言术语这样数学的东西时,你永远不能过于正式。
t1.f1
被称为 select_expr,在英语中 fudge 发音为“选择表达式”。请注意:
Each
select_expr
indicates a column that you want to retrieve.
所以另一种不太正式的英文称呼方式可能是“column”。
语法似乎区分了子句和条件,其中子句包含关键字WHERE
本身,但条件只是里面的普通 SQL 表达式。
The
WHERE
clause, if given, indicates the condition or conditions that rows must satisfy to be selected.where_condition
is an expression that evaluates to true for each row to be selected.
还有
In the
WHERE
expression, you can use any of the functions and operators that MySQL supports, except for aggregate (summary) functions. See Section 9.5, “Expression Syntax”
来自不同的syntax documentation page
MySQL supports the following
JOIN
syntaxes for thetable_references
part ofSELECT
statements
所以关于哪些表的整个部分 SELECT
from 被称为“表引用”。从这里我们可以深入研究与您上面的示例匹配的生产的语法:
join_table: table_reference [INNER | CROSS] JOIN table_factor [join_condition]
这意味着您所指的部分包含在“连接条件”中。然而,与 WHERE
一样上面的子句,连接条件还包含 ON
关键词。实际表达式(t1.f4 <> t2.f4)
又是一个普通的 conditional_expr
或“条件表达式”,就像 WHERE
中的那个上面的条款。
此文档页面中的一些更多详细信息产生了宝贵的见解:
The
conditional_expr
used with ON is any conditional expression of the form that can be used in a WHERE clause. Generally, you should use the ON clause for conditions that specify how to join tables, and the WHERE clause to restrict which rows you want in the result set.
因此,您可以通过调用您的 WHERE
以一种有用且有意义的方式非正式地区分它们。条件“行限制表达式”和 JOIN
condition 一个“连接条件表达式”。
关于mysql - 英文术语 MySQL 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31699426/
我正在使用 drupal 6.20 以及一些模块,包括面板、 View 和其他一些模块.. 问题是,每当我尝试启用面板提供的分类法覆盖页面时,我都会收到此错误,我修改了它等等,我似乎找不到一种方法来启
我正在寻找在类(非静态)中声明的实例变量的替代 OO/Java 术语,或者更具体地说,在用 JPA 注释“装饰”的 Java 类中声明的实例变量: @Entity @Table(name = "Dep
字母“t”在 LISP 中是什么意思? 例如: (defun last2 (lst) (cond ((null lst) nil) ((null (cdr lst)) (car l
我是 Java 的新手,想了解更多。我有一个当前问题想要得到解答,但我也想知道该技术指的是什么,以便我可以做一些进一步的阅读。 我目前有这样的东西: public class BasicActivit
是否有针对 HTML 标签的术语来区分哪些应该有结束标签,哪些不应该? 例如,和 应该有伴随 和 标签。 另一方面,和 不应该。 第一组叫什么,第二组叫什么? 最佳答案 我相信 是一个“空元素”,而不
基本上,问题已经总结在标题中。如果我们在不同的命名空间中有两个具有相同签名(即相同的名称、参数类型和顺序、泛型类型参数编号)的方法/函数,这算不算重载? 这是一个 C# 问题,但我很想为不同的 OOP
在 OO 范式中,我们选择使用类,因为它们可以帮助我们分解系统,并提供很好的附带好处,例如封装、职责分离、继承、模块化等。 如果我们在组件级别查看软件系统,我们是否可以简单地以相同的概念方式对待组件,
创建拉取请求和打开拉取请求之间有区别吗? 创建拉取请求的一些短语示例: 创建一个拉取请求以提议和协作对存储库的更改。 您可以在创建拉取请求时指定要将更改合并到哪个分支。 要创建草稿拉取请求,请使用下拉
我发现this script可以循环遍历.csv文件并将它们组合成一个Excel工作表。然后,我创建了第二个脚本,以如下方式调用该脚本: echo "Combining .csv files into
我忘记了 javascript 中用来描述特定现象的术语。它与内联函数中访问变量的方式有关。我也不太明白这个理论。我依稀记得下面的代码 for(var c = 0; c< 10; c++) { a
如何清除Java中的标准输入(术语)? 一点历史:我正在编写一个“反射”程序,算法非常简单: wait a random amount of time print "press enter" read
给定以下代码,是否存在一个静态方法的名称/术语,它为每个现有实例调用同名的实例方法? 这是任何编程语言的常见做法吗? 用例是能够进行一个函数调用并确保所有实例都受到影响,而无需为该方法复制代码。 注意
这个问题在这里已经有了答案: Accessing nested JavaScript objects and arrays by string path (44 个答案) 关闭 6 年前。 我需要澄
我的目标是从给定的输入文件中读取每行的第一个元素/术语,然后根据第一个元素是什么来决定要做什么(使用 if-else 构造)。 IE。如果第一个元素/单词恰好是“the”(如下面的代码中所述),那么我
在 Java 中,对象 可以有一个运行时类型(这是它创建时的类型)和一个转换类型(您将其转换为的类型)。 我想知道这些类型的正确名称是什么。例如 class A { } class B extends
根据 Python 2.7.12 文档,User-defined methods : User-defined method objects may be created when getting a
据我所知,nbsp(不间断空格)是这样的:。但制表符 (\t) 也是不间断空格,对吗?我的意思是它不会创建新行。 如果上述所有内容都是正确的,那么如何调用可以包含 或 \t 的变量?像 tabOrNb
我使用 GAS 已经有一段时间了,但没有很强的 Javascript 背景,并且在忽略大小写的情况下按字母顺序对工作表进行排序时遇到了问题。我做了一些搜索,并根据 SO 中的其他公开答案和其他一些来源
我是初学者,我在编程中发现了术语指针的几种定义。我想知道哪一个是正确的(也许两个都是)? a - 指针是保存内存地址的变量。鉴于此定义,在以下代码 char *msg; 中,我们可以说变量 msg 是
给定以下分支 A---B---C topic (HEAD) / D---E---F---G master 并运行命令 git rebase master 这是否意味着,我们是 将 t
我是一名优秀的程序员,十分优秀!