Union, Intercept, Except Flashcards

1
Q

What does the Union Statement do?

A

The UNION keyword combines the results of two SELECT statements into a single result set, eliminating duplicate rows by default.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What defines the column
name used in the result set?

A

The first data set entered into SQL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What two things must the data sets have if you want to use the union keyword?

A

Datasets must have the same number of columns and similar datatypes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What’s the difference between UNION and UNION ALL?

A

UNION ALL UNION ALL will
leave the duplicate rows in the result set. Their queries will also execute faster because it does not check for duplicate values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does INTERSECT do?

A

The INTERSECT keyword returns distinct rows that are found in both datasets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many data sets can be compared with the INTERSECT keyword?

A

2 datasets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the EXCEPT keyword do?

A

The EXCEPT keyword returns rows from the first dataset that are not found in the second dataset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly