CIS 3050 BANK 1 EXAM QUESTIONS AND ANSWERS
100% CORRECT
The ________ operator is used to combine the output from multiple queries into a single
result table.
A) Intersect
B) Divide
C) Collate
D) Union - answer D
A ________ is a temporary table used in the FROM clause of an SQL query.
A) correlated subquery
B) derived table
C) view table
D) trigger - answer B
In order for two queries to be UNION-compatible, they must:
A) both have the same number of lines in their SQL statements.
B) both output compatible data types for each column and return the same number of
rows.
C) both return at least one row.
D) both return exactly one row. - answer B
The UNION clause is used to:
A) combine the output from multiple queries into a single result table.
B) join two tables together to form one table.
C) find all rows that do not match in two tables.
D) find all rows that are in one table, but not the other. - answer A
Establishing IF-THEN-ELSE logical processing within an SQL statement can be
accomplished by:
A) using the if-then-else construct.
, B) using the immediate if statement.
C) using the CASE key word in a statement.
D) using a subquery. - answer C
All of the following are guidelines for better query design EXCEPT:
A) understand how indexes are used in query processing.
B) use a lot of self-joins.
C) write simple queries.
D) retrieve only the data that you need. - answer B
A join operation:
A) brings together data from two different fields.
B) causes two tables with a common domain to be combined into a single table or view.
C) causes two disparate tables to be combined into a single table or view.
D) is used to combine indexing operations. - answer B
A join in which the joining condition is based on equality between values in the common
columns is called a(n):
A) equi-join.
B) unilateral join.
C) natural join.
D) both A and C. - answer D
The following code is an example of a(n):
SELECT Customer_T.CustomerID, Order_T.CustomerID, CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;
A) equi-join.
B) subquery.
C) Full Outer JOIN.
100% CORRECT
The ________ operator is used to combine the output from multiple queries into a single
result table.
A) Intersect
B) Divide
C) Collate
D) Union - answer D
A ________ is a temporary table used in the FROM clause of an SQL query.
A) correlated subquery
B) derived table
C) view table
D) trigger - answer B
In order for two queries to be UNION-compatible, they must:
A) both have the same number of lines in their SQL statements.
B) both output compatible data types for each column and return the same number of
rows.
C) both return at least one row.
D) both return exactly one row. - answer B
The UNION clause is used to:
A) combine the output from multiple queries into a single result table.
B) join two tables together to form one table.
C) find all rows that do not match in two tables.
D) find all rows that are in one table, but not the other. - answer A
Establishing IF-THEN-ELSE logical processing within an SQL statement can be
accomplished by:
A) using the if-then-else construct.
, B) using the immediate if statement.
C) using the CASE key word in a statement.
D) using a subquery. - answer C
All of the following are guidelines for better query design EXCEPT:
A) understand how indexes are used in query processing.
B) use a lot of self-joins.
C) write simple queries.
D) retrieve only the data that you need. - answer B
A join operation:
A) brings together data from two different fields.
B) causes two tables with a common domain to be combined into a single table or view.
C) causes two disparate tables to be combined into a single table or view.
D) is used to combine indexing operations. - answer B
A join in which the joining condition is based on equality between values in the common
columns is called a(n):
A) equi-join.
B) unilateral join.
C) natural join.
D) both A and C. - answer D
The following code is an example of a(n):
SELECT Customer_T.CustomerID, Order_T.CustomerID, CustomerName, OrderID
FROM Customer_T, Order_T
WHERE Customer_T.CustomerID = Order_T. CustomerID;
A) equi-join.
B) subquery.
C) Full Outer JOIN.