Deck 12: Subqueries and Merge Statements
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/132
العب
ملء الشاشة (f)
Deck 12: Subqueries and Merge Statements
1
A multiple-row subquery can be nested in a HAVING clause.
True
2
Valid single-row operators include =, >, <, >=, <=.
True
3
A correlated subquery references one or more columns in the outer query, and the EXISTS operator is used to test whether the relationship or link is present.
True
4
The EXISTS operator can be used with multiple-row subqueries.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
5
Multiple-row subqueries are nested queries that can return more than one row of results to the parent query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
6
A subquery is a complete query nested inside another query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
7
When used with a multiple-row subquery, the IN operator indicates that the records processed by the outer query must match one of the values returned by the subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
8
A subquery can only be nested in the WHERE or HAVING clause of the outer query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
9
If a subquery is nested in a HAVING clause, the subquery must be on the right side of the comparison operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
10
A group function cannot be included in the SELECT clause of a single-row subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
11
Single-row operators can be used with multiple-row subqueries that return only one column of results.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
12
A single-row subquery can return several columns, but only one row, of results to the outer query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
13
A subquery nested in a SELECT clause cannot contain an ORDER BY clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
14
A multiple-column subquery cannot be nested in a WHERE clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
15
A single-row subquery can be nested in the SELECT clause of the outer function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
16
The equal sign, =, is a valid single-row operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
17
When a multiple-column subquery is used in the outer query's FROM clause, it creates a temporary table, called an inline view, that can be referenced by other clauses of the outer query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
18
The
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
19
The results of the outer query are passed to the inner query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
20
When a multiple-column subquery is used in the WHERE clause of the outer query, the column names listed on the left side of the comparison operator must be enclosed in double-quotation marks.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
21
In Oracle11g, a MERGE statement compares data between two tables and can perform a series of DML actions to assist in synchronizing the data of the two tables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
22
A(n) single-row subquery can be nested in a(n) clause. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
23
A subquery is required when the condition for the query is based upon an unknown. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
24
In Oracle11g, subqueries can be nested to a depth of 255 in a WHERE clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
25
IN is a valid subquery operator. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
26
The greater than operator, >, is a valid operator for subqueries. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
27
When the subquery is executed first and the value is passed back as input to the outer query, the subquery is known as an uncorrelated subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
28
A subquery nested in a WHERE clause can only be on the side of the comparison operator. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
29
A subquery must be enclosed in a set of _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
30
A subquery is required when the condition for the outer query is based upon an unknown.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
31
A correlated subquery is one in which the inner query is executed first, and then the outer query is executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
32
Valid operators include =, >, <, >=, <=. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
33
The NVL function can be used in a subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
34
A correlated subquery is a subquery that is executed once for each row in the outer query.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
35
The results of the subquery are passed to the query. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
36
When a multiple-column subquery is included in the outer query's WHERE clause, the column names listed in the WHERE clause must be in the same order as they're listed in the subquery's SELECT clause.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
37
A(n) query is also referred to as a parent query. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
38
IN is not a valid operator for a multiple-column subquery.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
39
The operator indicates that a value must be less than the lowest value returned by the subquery to be included in the results. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
40
A subquery, except one in the FROM clause, can't have an clause. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
41
A multiple-column subquery nested in the clause of the outer query is known as an inline view. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
42
Any type of subquery can be used in the ____ clause of a SELECT statement.
A) WHERE
B) HAVING
C) FROM
D) all of the above
A) WHERE
B) HAVING
C) FROM
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
43
A(n) clause can be used in a subquery. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
44
The outer query receives its input from the ____.
A) inner view
B) outer view
C) nested function
D) subquery
A) inner view
B) outer view
C) nested function
D) subquery
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
45
The operator can be used with single-row, multiple-row, or multiple-column subqueries. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
46
In Oracle11g, there is no depth limit on the number of subqueries that can be nested in a(n) clause. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
47
In Oracle11g, subqueries in a WHERE clause can be nested to a depth of . _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
48
The operator is valid for multiple-row subqueries. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
49
When a multiple-column subquery is used in the WHERE clause of the outer query, the column names listed on the left side of the comparison operator must be enclosed in . _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
50
Which of the following subqueries returns more than one row of results to the outer query?
A) multiple-column subquery
B) single-row subquery
C) multiple-row subquery
D) correlated subquery
A) multiple-column subquery
B) single-row subquery
C) multiple-row subquery
D) correlated subquery
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
51
An outer query is also referred to as a(n) ____ query.
A) parent query
B) outer view
C) outline view
D) all of the above
A) parent query
B) outer view
C) outline view
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
52
A(n) correlated subquery references one or more columns the outer query. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
53
A group function can be used in a(n) . _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
54
The operator yields the same results as using the IN multiple-row operator. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
55
A complete query nested inside another query is called a(n) ____.
A) inner view
B) subquery
C) child view
D) all of the above
A) inner view
B) subquery
C) child view
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
56
A(n) subquery is when the outer query is executed first, and then the inner query is executed. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
57
You include multiple subqueries in a SELECT statement. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
58
A(n) subquery is when the outer query is executed first, then the inner query is executed. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
59
The operator is used to determine whether a condition is present in a subquery. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
60
Which of the following can be used in a WHERE clause?
A) single-row subquery
B) multiple-column subquery
C) multiple-row subquery
D) all of the above
A) single-row subquery
B) multiple-column subquery
C) multiple-row subquery
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
61
Which of the following must be used to separate a subquery from the outer query?
A) / /
B) " "
C) | |
D) ( )
A) / /
B) " "
C) | |
D) ( )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
62
Which clause is used when the group results of a subquery need to be restricted, based on some condition?
A) GROUP BY
B) HAVING
C) WHERE
D) ORDER BY
A) GROUP BY
B) HAVING
C) WHERE
D) ORDER BY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
63
The > operator is referred to as a(n) ____ operator.
A) multiple-row
B) multiple-column
C) single-row
D) none of the above
A) multiple-row
B) multiple-column
C) single-row
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
64
The ____ operator indicates that the records processed by the outer query must match one of the values returned by the subquery.
A) IN
B) >ANY
C)D) >ALL
A) IN
B) >ANY
C)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
65
The following SQL statement contains what type of subqueries? SELECT isbn, title FROM books WHERE pubid =
(SELECT pubid FROM books WHERE title = 'SHORTEST POEMS')
AND retail-cost >
(SELECT AVG(retail-cost) FROM books);
A) single-row
B) multiple-row
C) multiple-column
D) inline view
(SELECT pubid FROM books WHERE title = 'SHORTEST POEMS')
AND retail-cost >
(SELECT AVG(retail-cost) FROM books);
A) single-row
B) multiple-row
C) multiple-column
D) inline view
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
66
Which of the following operators is used with a multiple-row subquery?
A) IN
B) ANY
C) ALL
D) all of the above
A) IN
B) ANY
C) ALL
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
67
The <= operator is referred to as a(n) ____ operator.
A) multiple-row
B) correlated
C) uncorrelated
D) single-row
A) multiple-row
B) correlated
C) uncorrelated
D) single-row
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
68
The following SQL statement contains which type of subquery? SELECT title, retail, (SELECT AVG(retail) FROM books)
FROM books;
A) single-row
B) multiple-row
C) multiple-column
D) inline view
FROM books;
A) single-row
B) multiple-row
C) multiple-column
D) inline view
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
69
The operators =, <, >, <=, >=, and <> are referred to as ____ operators.
A) multiple-row
B) single-row
C) correlated
D) multiple column
A) multiple-row
B) single-row
C) correlated
D) multiple column
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
70
A(n) ____ subquery is one that can return several rows of results.
A) correlated
B) single-row
C) multiple-row
D) uncorrelated
A) correlated
B) single-row
C) multiple-row
D) uncorrelated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
71
The results of a subquery are passed back as input to the ____ query.
A) inner
B) outer
C) correlated
D) uncorrelated
A) inner
B) outer
C) correlated
D) uncorrelated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
72
Which operators can be combined with other comparison operators to treat the results of a subquery as a set of values, rather than as individual values?
A) IN and ANY
B) IN and ALL
C) ALL and ANY
D) EXISTS and IN
A) IN and ANY
B) IN and ALL
C) ALL and ANY
D) EXISTS and IN
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
73
If the result returned from a subquery must be compared to a group function, then the inner query must be nested in the outer query's ____ clause.
A) GROUP BY
B) WHERE
C) HAVING
D) FROM
A) GROUP BY
B) WHERE
C) HAVING
D) FROM
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
74
The >ALL operator indicates that a value must be ____ value returned by the subquery.
A) more than the highest
B) less than the highest
C) more than the lowest
D) less than the lowest
A) more than the highest
B) less than the highest
C) more than the lowest
D) less than the lowest
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
75
A subquery must include a(n) ____ clause.
A) SELECT
B) FROM
C) WHERE
D) both a and b
A) SELECT
B) FROM
C) WHERE
D) both a and b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
76
The <> operator is referred to as a(n) ____ operator.
A) single-row
B) multiple row
C) multiple-column
D) correlated
A) single-row
B) multiple row
C) multiple-column
D) correlated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
77
A subquery, except one in the FROM clause, cannot contain a(n) ____ clause.
A) GROUP BY
B) HAVING
C) ORDER BY
D) WHERE
A) GROUP BY
B) HAVING
C) ORDER BY
D) WHERE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
78
The following SQL statement contains which type of subquery? SELECT title, retail, category FROM books
WHERE retail IN (SELECT MAX(retail) FROM books
GROUP BY category);
A) single-row
B) multiple-row
C) multiple-column
D) correlated
WHERE retail IN (SELECT MAX(retail) FROM books
GROUP BY category);
A) single-row
B) multiple-row
C) multiple-column
D) correlated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
79
The = operator is referred to as a(n) ____ operator.
A) single-row
B) multiple-row
C) correlated
D) uncorrelated
A) single-row
B) multiple-row
C) correlated
D) uncorrelated
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck
80
Which operator will instruct Oracle11g to list all records with a value that is more than the highest value returned by the subquery?
A)B) C) >ALL
D) >ANY
A)
D) >ANY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 132 في هذه المجموعة.
فتح الحزمة
k this deck