Vous êtes sur la page 1sur 4

6/26/2017 MurachSQLServer2012Chapter6Flashcards|Quizlet

Murach SQL Server 2012 Chapter 6 52 terms ericanz4

Like
this
study
set? Create a free
Create account
a free
account Maybe later

to save
it.

subquery a select statement that's coded within another SQL


statement

nested subquery a subquery within a subquery

innermost to outermost nested subqueries evaluate from _______ to _______


single value, result set subqueries can return ______, _______, and ______
with one column, result
set with more than one
column

where, having, from, subqueries can be introduced in which four clauses?


select

https://quizlet.com/191734004/murachsqlserver2012chapter6flashcards/ 1/4
6/26/2017 MurachSQLServer2012Chapter6Flashcards|Quizlet

search condition if a subquery is introduced in the where clause, it is as a


_______________

search condition if a subquery is introduced in the having clause, it is as a


_________

table specification if a subquery is introduced in the from clause, it is as a


___________

column specification if a subquery is introduced in the select clause, it is as a


________

single value A subquery that returns (a)_______ can be coded anywhere


an expression is allowed

single column A subquery that returns (a) _______ can be coded in place of
a list of values, such as the values for an IN phrase

one or more columns A subquery that returns (a) _____ can be introduced in place
of a table in the FROM clause

subquery search a subquery that's used in a WHERE or HAVING clause is


condition called a ___________

subquery predicate another term for a subquery search condition

subquery search the most common use for a subquery


condition

joins Most subqueries can be restated as _____

subqueries Most joins can be restated as ________

outer query The result set of a query with a subquery can ONLY include
columns from the table named in the _________

Join Only a ______ can produce a result set that includes columns
from both tables

Join A ______ tends to be more intuitive when it uses an existing


relationship between the two tables

Join If you were using a relationship between a primary key and


a foreign key, you should use a _______

Join Which performs faster, joins or subqueries?

https://quizlet.com/191734004/murachsqlserver2012chapter6flashcards/ 2/4
6/26/2017 MurachSQLServer2012Chapter6Flashcards|Quizlet

aggregate value, outer You can use a subquery to pass an ___________ to the ________
query

ad hoc A subquery is more intuitive when it comes to an __________


relationship between the two tables

long, complex queries Which type of queries are easier to code with subqueries?

single column of values If you use the IN operator, the subquery must result (a)
_____________

outer join Instead of using the NOT IN operator with a subquery, use
a(n) __________

single value If you code a search condition without the SOME, ANY,
and ALL keywords, the subquery must return a __________

ALL The ALL keyword tests that a comparison condition is true


for _________ of the values returned by a subquery

true If no rows are returned by the subquery, a comparison that


uses ALL is always ________

false If all of the rows returned by the subquery contain a null


value, a comparison that uses ALL is always _________

any or some The ______________ keyword tests that a condition is true for at
least one of the values returned by a subquery

false if no rows returned by the subquery or all of the rows


returned by the subquery contain a null value, a
comparison that uses ANY or SOME is always _________

correlated subquery a subquery that is executed once for each row processed
by the outer query

noncorrelated a subquery that is executed only once


subquery

the value of a column in A correlated subquery refers to ____________________


the outer query

different Each execution of a subquery returns (a) ____________ result

alias or correlation If the subquery uses the same table as the outer query, you

https://quizlet.com/191734004/murachsqlserver2012chapter6flashcards/ 3/4
6/26/2017 MurachSQLServer2012Chapter6Flashcards|Quizlet

name must assign a(n) ______________ to one of the tables


qualified column name A correlated subquery uses a ___________ that includes the
table name from the outer query

EXISTS Use this operator to test that one or more rows are
returned by the subquery

NOT EXISTS Use this operator to test that no rows are returned by the
subquery

0 A subquery with the EXISTS operator returns __________ rows

indication of whether A subquery with the exists operators returns an


any rows meet the ______________________
condition

correlated subqueries The EXISTS operator is used most often with ________________

derived table A subquery that's coded in the FROM clause returns a


result set called (a) _________________

alias When you create a derived table, you must assign a(n)
______________

FROM When you code a subquery in the ________ clause, you must
assign names to any calculated values in the result set

derived tables Most useful when you need to further summarize the
results of a summary query

single value When you code a subquery for a column specification in


the SELECT clause, the subquery must return a _________

correlated subquery a subquery that's coded within a select clause is usually a


________________

join Should you use a subquery or a join in the select clause?

faster and more Code a join instead of a subquery in the select clause
readable because it's _________________

https://quizlet.com/191734004/murachsqlserver2012chapter6flashcards/ 4/4

Vous aimerez peut-être aussi