Quiz 4 Flashcards

1
Q

When you code a union that combines two result sets, which of the following is not true?

duplicate rows in the result set are allowed *

each result set must have the same number of columns *

the result sets must be derived from different tables

the corresponding columns in the result sets must have compatible data types

A

3rd one??

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

A full outer join includes rows that satisfy the join condition, plus ___________

Show answer choices

rows in the right table that don’t satisfy the join condition

the Cartesian product of the two tables

rows in both tables that don’t satisfy the join condition

rows in the left table that don’t satisfy the join condition

A

rows in both tables that don’t satisfy the join condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. Table aliases are temporary table names assigned in which clause?

Show answer choices

FROM

ORDER BY

ON

WHERE

A

FROM

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

In most cases, the join condition of an inner join compares the primary key of one table to the ____________________ key of another table

Show answer choices

primary

SELECT

foreign

unique

A

foreign

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

The bringing together of rows from two tables.

A

Join

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

Specifies how the rows of table A are to be brought together with the rows of table B.

A

Join Condition

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

For an inner join (defalut type) only rows from table A and table B that satisfy the join condition are placed on the table C. If rows exist in table A and/or table B that do not satify the join condition, these rows will not be present in table C.

A

Inner Join

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

A fully qualified name consists of four parts: a server name, a database name, a schema name, and the name of the object itself. At times it will be necessary to qualify a column name (either partially or fully) to tell SQL server the source of the column.

A

Qualified Column Name

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

The join syntax introduced in the SQL-92 standard.

A

explicit syntax

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

Temporary table names assigned in the FROM clause.

A

correlation name or table alias

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

A join where a table is joined to itself.

A

self-join

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

Pre SQL92 join Syntax.

A

implicit syntax

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

A join in which all the rows of a table appear in the join results, regardless of whether they have a match in the join condition.

A

Outer Join

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

All of the rows in the left table appear in the join results, regardless of whether they have a match in the join condition.

A

Left Outer Join

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

All of the rows in the right table appear in the join results, regardless of whether they have a match in the join condition.

A

Right Outer Join

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

All of the rows in both joined tables appear in the join results regardless of whether they have a match in the join condition.

A

Full Outer Join

17
Q

Each row from table A is joined (concatenated) with each row from table B.

A

Cross Join (Cartesian Product)

18
Q

Combining the results of two or more SELECTS that return the same number of corresponding columns.

A

Union

19
Q

A union combines the rows from two or more _______

SELECT statements

string expressions

databases

tables

A

SELECT statements

20
Q

If you assign an alias to one table in a join, you have to _________

Show answer choices

use that name for the table in the query

assign one to all of the tables in the query

qualify every column name in the query

qualify all of the column names for that table

A

use that name for the table in the query

21
Q

In a join, column names only need to be qualified where?

in inner joins

when the code is confusing

in outer joins

when the same column names are used in both tables

A

when the same column names are used in both tables

22
Q

SELECT VendorName AS Vendor, InvoiceDate AS Date

FROM Vendors v JOIN Invoices i ON v.VendorID = i.VendorID;

This type of join is called _________________________

a left join

a right join

an inner join

an outer join

A

an inner join
?