BAO FINAL EXAM QUESTIONS & ANSWERS
In subquery terminology, the first query in the SQL statement is known as the _____
query. - Answer -outer
The special operator used to check whether a subquery returns any rows is _____. -
Answer -EXISTS
Which of the following differentiates the HAVING clause from the WHERE clause? -
Answer -WHERE is executed prior to GROUP BY and HAVING after
While designing a query you determine that the data needs to be preprocessed. Which
of the following is most appropriate? - Answer -Use a subquery to preprocess.
A condition is true if it satisfies any value (one or more) produced by a subquery that is
preceded by the _____. - Answer -ANY operator
When a query includes the clause FROM CLIENT A, CLIENT B, SQL will _____. -
Answer -treat it as a query of two tables, A and B
When tables are listed in the FROM clause of an SQL query, you can give them
alternate names, also known as _____. - Answer -aliases
Which element belongs in the blank if you want to display data from all rows with a
credit limit greater than the credit limit of one or more category B cardholders?
WHERE (CREDIT_LIMIT > _____ (SELECT CREDIT_LIMIT FROM CARDHOLDER
WHERE CATEGORY = 'B')) - Answer -ANY
You can join tables by using a condition in the _____. - Answer -WHERE clause
Which statement about subqueries is true? - Answer -A subquery filters the same way
an inner join does.
A condition is true if it satisfies any value (one or more) produced by a subquery that is
preceded by the _____. - Answer -ANY operator
The _____ of two tables is a table containing all rows that are in both tables. - Answer -
intersection
The _____ of two tables is a table containing every row that is in either the first table,
the second table, or both tables. - Answer -union
To retrieve data from multiple tables in a query, you can use a subquery containing the
_____. - Answer -IN operator
In subquery terminology, the first query in the SQL statement is known as the _____
query. - Answer -outer
The special operator used to check whether a subquery returns any rows is _____. -
Answer -EXISTS
Which of the following differentiates the HAVING clause from the WHERE clause? -
Answer -WHERE is executed prior to GROUP BY and HAVING after
While designing a query you determine that the data needs to be preprocessed. Which
of the following is most appropriate? - Answer -Use a subquery to preprocess.
A condition is true if it satisfies any value (one or more) produced by a subquery that is
preceded by the _____. - Answer -ANY operator
When a query includes the clause FROM CLIENT A, CLIENT B, SQL will _____. -
Answer -treat it as a query of two tables, A and B
When tables are listed in the FROM clause of an SQL query, you can give them
alternate names, also known as _____. - Answer -aliases
Which element belongs in the blank if you want to display data from all rows with a
credit limit greater than the credit limit of one or more category B cardholders?
WHERE (CREDIT_LIMIT > _____ (SELECT CREDIT_LIMIT FROM CARDHOLDER
WHERE CATEGORY = 'B')) - Answer -ANY
You can join tables by using a condition in the _____. - Answer -WHERE clause
Which statement about subqueries is true? - Answer -A subquery filters the same way
an inner join does.
A condition is true if it satisfies any value (one or more) produced by a subquery that is
preceded by the _____. - Answer -ANY operator
The _____ of two tables is a table containing all rows that are in both tables. - Answer -
intersection
The _____ of two tables is a table containing every row that is in either the first table,
the second table, or both tables. - Answer -union
To retrieve data from multiple tables in a query, you can use a subquery containing the
_____. - Answer -IN operator