Deck 9: Joining Data From Multiple Tables
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/119
Play
Full screen (f)
Deck 9: Joining Data From Multiple Tables
1
The USING clause must be used with the JOIN keyword when linking tables that do not contain a commonly named column.
False
2
An outer join operator can be included in a FROM clause to list all rows from one table that do not have a corresponding row in the other table.
False
3
If a Cartesian join is used to link table A which contains two rows to table B which contains eight rows,there will be sixteen rows in the results.
True
4
Data stored in multiple tables can be combined through the use of an ORDER BY clause.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
5
An outer join only lists rows that contain a match in both tables.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
6
A table alias is assigned to a table in the WHERE clause.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
7
Column qualifiers must be included in the WHERE clause if the columns used to join the tables have the same column names.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
8
A Cartesian join usually results from the user omitting the joining condition that links two or more tables together.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
9
The JOIN keyword is used in the WHERE clause to indicate the tables that should be joined or linked.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
10
The NATURAL JOIN keywords can be used to link two tables that have a commonly named and defined column.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
11
When a self-join is created,each copy of the table must be assigned a table alias.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
12
A column qualifier is used to indicate the table containing the column being referenced.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
13
A column qualifier is separated from the column name with a colon.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
14
If a Cartesian join is used to link table A which contains five rows to table B which contains eight rows,there will be 13 rows in the results.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
15
A table alias can be assigned in the FROM clause,even when tables are being joined using the NATURAL JOIN keywords.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
16
The NATURAL JOIN keywords can be used to create non-equality joins.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
17
Equality,non-equality,and self-joins are all categorized as inner joins.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
18
An inequality join refers to a join that is used to link a table to a copy of itself.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
19
The most common type of join is an equijoin,which joins two or more tables together based upon the tables having equivalent data values in a common column.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
20
An outer join operator consists of a minus sign enclosed in parentheses, (-).
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
21
A(n)non-equality join is used when there are no equivalent rows of data in the tables that are being joined._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
22
The outer join operator is placed on the side of the joining condition that references the table containing the deficient rows._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
23
A(n)non-equality join is when a table is joined to itself._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
24
The outer join operator is used to combine the results of multiple SELECT statements._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
25
The UNION set operator will not suppress rows that are returned by both queries.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
26
Tables can be joined in the FROM clause or the WHERE clause of a SELECT statement._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
27
A column qualifier indicates the column containing the data being referenced._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
28
The outer join operator is placed on the side of the comparison that is deficient or is missing the matching rows.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
29
The number of joining conditions required to join tables is always one less than the number of tables being joined.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
30
A(n)outer join can be created by not including a joining condition in a SELECT statement._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
31
By default,use of the JOIN keyword creates an inner join.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
32
A full outer join can be created by including an outer join operator on both sides of the linking condition stated in the WHERE clause.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
33
The JOIN keyword must be used in the WHERE clause of a SELECT statement._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
34
A(n)non-equality join is also known as an equijoin,inner join,or simple join._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
35
The INTERSECT set operator only displays the rows returned by both queries.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
36
The MINUS set operator is used to display rows that were uniquely returned by the first query in the set.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
37
Set operators are used to combine the results of multiple queries.
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
38
A cross join between two tables,containing four rows each,will display eight rows in its output._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
39
A Cartesian join can be created by not including a joining condition in the WHERE clause of a SELECT statement._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
40
A(n)Cartesian Join replicates each row from the first table with every row from the second table._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
41
Which of the following is used to create an outer join in a WHERE clause?
A) FULL OUTER JOIN keywords
B) LEFT OUTER JOIN keywords
C) RIGHT OUTER JOIN keywords
D) outer join operator (+)
A) FULL OUTER JOIN keywords
B) LEFT OUTER JOIN keywords
C) RIGHT OUTER JOIN keywords
D) outer join operator (+)
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
42
If a table alias is assigned in the SELECT clause,it must be used any time the table is referenced in that SQL statement._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
43
In Oracle12c,tables can be linked through which clause(s)?
A) SELECT
B) FROM
C) WHERE
D) both b and c
A) SELECT
B) FROM
C) WHERE
D) both b and c
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
44
The ON clause can be used only if the tables being joined have a common column with the same name._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
45
A table alias is assigned in the FROM clause._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
46
Which of the following types of joins refers to results consisting of each row from the first table being replicated from every row in the second table?
A) outer join
B) non-equality join
C) self-join
D) Cartesian join
A) outer join
B) non-equality join
C) self-join
D) Cartesian join
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
47
Equality,non-equality,and self-joins are broadly categorized as outer joins._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
48
When combining the results of two SELECT statements with the UNION keyword,duplicate rows are suppressed in the results._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
49
A(n)inner join will only include rows that have matching rows in the other table._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
50
Which of the following types of joins is created by matching equivalent values in each table?
A) Cartesian join
B) equality join
C) non-equality join
D) outer join
A) Cartesian join
B) equality join
C) non-equality join
D) outer join
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
51
In a Cartesian join,linking a table that contains 10 rows to a table that contains 9 rows will result in ____ rows being displayed in the output.
A) 19
B) 18
C) 90
D) 89
A) 19
B) 18
C) 90
D) 89
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
52
Which of the following keywords is used to create a Cartesian join?
A) OUTER JOIN
B) CROSS JOIN
C) NATURAL JOIN
D) JOIN...USING
A) OUTER JOIN
B) CROSS JOIN
C) NATURAL JOIN
D) JOIN...USING
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
53
The JOIN...USING keywords are used to join two tables that do not have a commonly named and defined column._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
54
If you are joining five tables in a SELECT statement,five joining conditions will be required._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
55
If you are joining two tables in a SELECT statement,three joining conditions will be required._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
56
By default,the JOIN keyword creates an inner join._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
57
When combining the results of two SELECT statements with the MINUS keyword,duplicate rows are suppressed in the results._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
58
Which of the following types of joins refers to joining a table to itself?
A) Cartesian join
B) equality join
C) self-join
D) outer join
A) Cartesian join
B) equality join
C) self-join
D) outer join
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
59
The JOIN keyword is included in which of the following clauses?
A) SELECT
B) FROM
C) WHERE
D) ORDER BY
A) SELECT
B) FROM
C) WHERE
D) ORDER BY
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
60
If you are joining four tables in a SELECT statement,three joining conditions will be required._________________________
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
61
If you are attempting to join two tables that have multiple common columns,which of the following JOIN keywords should be used to specify how the tables should be linked?
A) OUTER JOIN
B) CROSS JOIN
C) JOIN...USING
D) none of the above
A) OUTER JOIN
B) CROSS JOIN
C) JOIN...USING
D) none of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
62
Which of the following terms refers to a column with equivalent data that exists in two or more tables?
A) common column
B) equiv-column
C) inner columns
D) simple columns
A) common column
B) equiv-column
C) inner columns
D) simple columns
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
63
In which of the following examples is the ORDERS table used as a column qualifier?
A) o.order#
B) orders.order#
C) order#.o
D) order#.orders
A) o.order#
B) orders.order#
C) order#.o
D) order#.orders
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
64
Which of the following set operators will display only the unique results of the combined SQL statements?
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
65
Which of the following set operators will display the results of the combined SQL statements without suppressing duplicate rows?
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
66

Structure of the ORDERS table

Which of the following SQL statements will display all customers who have not recently placed an order?
A) SELECT customer# FROM customers
UNION
SELECT customer# FROM orders;
B) SELECT customer# FROM orders
MINUS
SELECT customer# FROM customers;
C) SELECT customer# FROM orders
INTERSECT
SELECT customer# FROM customers;
D) SELECT customer# FROM customers
MINUS
SELECT customer# FROM orders;
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
67
A table alias cannot be assigned in the FROM clause if which of the following keywords is used to join tables?
A) NATURAL JOIN
B) JOIN...ON
C) LEFT OUTER JOIN
D) FULL OUTER JOIN
A) NATURAL JOIN
B) JOIN...ON
C) LEFT OUTER JOIN
D) FULL OUTER JOIN
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
68
A table alias can consist of a maximum of ____ characters.
A) 12
B) 225
C) 255
D) 30
A) 12
B) 225
C) 255
D) 30
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
69
A join based upon a column from each table containing equivalent data is known as a(n)____.
A) inequality join
B) outer join
C) equality join
D) all of the above
A) inequality join
B) outer join
C) equality join
D) all of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
70
The outer join operator in the WHERE clause cannot be used with which of the following operators?
A) IN
B) OR
C) AND
D) both a and b
A) IN
B) OR
C) AND
D) both a and b
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
71

Structure of the ORDERS table

Which of the following SQL statements will return the names of all customers who placed an order on April 12,2003?
A) SELECT lastname,firstname
FROM customers
WHERE orderdate = '12-APR-03';
B) SELECT lastname,firstname
FROM customers NATURAL JOIN orders
WHERE orderdate = '12-APR-03';
C) SELECT lastname,firstname
FROM customers JOIN orders ON (customer#)
WHERE orderdate = '12-APR-03';
D) both a and b
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
72
A(n)____ is used to combine the results of two queries.
A) concatenation operator
B) set operator
C) comparison operator
D) logical operator
A) concatenation operator
B) set operator
C) comparison operator
D) logical operator
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
73

Structure of the ORDERS table

Which of the following SQL statements will list the name of each customer stored in the customers table,and,if the customer has placed an order that is contained in the ORDERS table,the order# of any order each customer has placed?
A) SELECT lastname,firstname,order#
FROM orders RIGHT OUTER JOIN customers
USING (customer#);
B) SELECT lastname,firstname,order#
FROM orders LEFT OUTER JOIN customers
USING (customer#);
C) SELECT lastname,firstname,order#
FROM orders FULL OUTER JOIN customers
USING (customer#);
D) both a and c
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
74
Which of the following set operators can be used to make certain that only the rows returned by both queries are displayed in the results?
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
A) UNION
B) UNION ALL
C) INTERSECT
D) MINUS
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
75

Structure of the ORDERS table

Which of the following queries will display data from both the ORDERS and CUSTOMERS tables?
A) SELECT * FROM orders,customers;
B) SELECT lastname,firstname,order#
FROM orders NATURAL JOIN customers;
C) SELECT lastname,firstname,order#
FROM orders,customers
WHERE orders.customer# = customers.customer#;
D) all of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
76
Which of the following can only be used to link tables that have a common column?
A) FULL OUTER JOIN
B) JOIN...ON
C) NATURAL JOIN
D) CROSS JOIN
A) FULL OUTER JOIN
B) JOIN...ON
C) NATURAL JOIN
D) CROSS JOIN
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
77
Which of the following keywords can be used to join two tables that do not contain a commonly named and defined column?
A) NATURAL JOIN
B) JOIN...ON
C) JOIN...USING
D) none of the above
A) NATURAL JOIN
B) JOIN...ON
C) JOIN...USING
D) none of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
78
Which of the following keywords is used to create an equality join?
A) NATURAL JOIN
B) JOIN...ON
C) JOIN...USING
D) all of the above
A) NATURAL JOIN
B) JOIN...ON
C) JOIN...USING
D) all of the above
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
79
A column qualifier is separated from the column using which symbol?
A) comma (,)
B) plus sign (+)
C) period (. )
D) percent sign (%)
A) comma (,)
B) plus sign (+)
C) period (. )
D) percent sign (%)
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck
80

Structure of the ORDERS table

Which of the following SQL statements will list the name of each customer stored in the CUSTOMERS table,and,if the customer has placed an order that is contained in the ORDERS table,the order# of any order each customer has placed?
A) SELECT lastname,firstname,order#
FROM customers NATURAL JOIN orders
WHERE orders.customer# IS NOT NULL;
B) SELECT lastname,firstname,order#
FROM customers,orders
WHERE orders.customer# (+)= customers.customer#;
C) SELECT lastname,firstname,order#
FROM customers,orders
WHERE orders.customer# = customers.customer# (+);
D) SELECT lastname,firstname,order#
FROM customers NATURAL JOIN orders
WHERE orders.customer# IS NULL;
Unlock Deck
Unlock for access to all 119 flashcards in this deck.
Unlock Deck
k this deck