考试报名
考试报名
考试内容
考试大纲
在线客服
返回顶部

备考刷题,请到

CDA认证小程序

To associate data from different tables, horizontal joins can be used. Which of the following is NOT an SQL horizontal join method? ()
A. right join
B. left join
C. union
D. full join
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

C is a vertical join, not a horizontal join command, so C is correct.

在SQL中,水平连接(horizontal join)用于将来自不同表的数据关联起来。常见的水平连接方法包括:

A: right join
B: left join
C: union
D: full join

其中,`right join`、`left join`和`full join`都是SQL中的连接(join)方法,用于关联两个表的数据。具体解释如下:

- **right join**:返回右表中的所有记录,以及左表中与之匹配的记录。如果左表中没有匹配的记录,则结果中包含NULL。
- **left join**:返回左表中的所有记录,以及右表中与之匹配的记录。如果右表中没有匹配的记录,则结果中包含NULL。
- **full join**:返回左右表中的所有记录。当左表或右表中没有匹配的记录时,结果中包含NULL。

而`union`并不是一种连接(join)方法,它用于将两个或多个SELECT语句的结果集合并成一个结果集。`union`操作符会去除重复的记录。

因此,正确答案是C: union。`union`并不是一种水平连接方法。

希望这个解释对您有所帮助。