978-0134601533 Appendix E Part 2

subject Type Homework Help
subject Pages 9
subject Words 1849
subject Authors David Auer, David M. Kroenke, Scott L. Vandenberg

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
55) The SQL command SELECT is used to retrieve data from view instances.
56) The SQL keyword ORDER BY can be used with SELECT statements that are retrieving data
from view instances to sort the results of the SELECT.
57) When an SQL SELECT statement is used to retrieve data from a view instance, the
maximum number of columns that can be specified in the SELECT is the same as the number of
columns in the table underlying the view.
58) The SQL statement ALTER EXISTING VIEW ViewName AS is used to modify a view.
59) Microsoft Access supports standard SQL view statements.
60) Since an SQL view is essentially a stored query, Microsoft Access queries can be used to
implement SQL view equivalents.
page-pf2
61) Microsoft Access queries cannot use previously stored view equivalent Access queries.
62) SQL views are constructed from ________.
A) CREATE statements
B) INSERT statements
C) UPDATE statements
D) SELECT statements
E) VIEW statements
63) SQL statements used to construct views cannot contain ________.
A) the SELECT clause
B) the FROM clause
C) the WHERE clause
D) the ORDER BY clause
E) the LIKE keyword
64) SQL view instances are retrieved using the ________.
A) SQL CREATE statement
B) SQL DELETE statement
C) SQL INSERT statement
D) SQL SELECT statement
E) SQL UPDATE statement
page-pf3
65) Although it cannot be used in creating an SQL VIEW, the SQL SELECT statements
retrieving view instances can include ________.
A) SQL keyword ORDER BY
B) SQL keyword LIKE
C) SQL keyword BETWEEN
D) SQL keyword NULL
E) SQL keyword NOT NULL
66) When an SQL SELECT statement is used to retrieve data from a view instance, the
maximum number of columns that can be specified in the SELECT is the same as the number of
columns ________.
A) in the table underlying the view
B) in the VIEW specification
C) in the ORDER BY clause
D) in the HAVING clause
E) that have aliases
67) The SQL statement used to modify a view is ________.
A) ALTER EXISTING VIEW ViewName AS
B) ALTER VIEW ViewName AS
C) DROP EXISTING VIEW ViewName
D) DROP VIEW ViewName
E) MODIFY VIEW ViewName AS
page-pf4
68) The SQL statement used to delete a view from a database is ________.
A) ALTER EXISTING VIEW ViewName AS
B) ALTER VIEW ViewName AS
C) DELETE VIEW ViewName
D) DROP EXISTING VIEW ViewName
E) DROP VIEW ViewName
page-pf5
69) Based on the tables below, which of the following SQL commands would create an SQL
view named CustomerSalesRep that could be used to display CustNo, CustName, RepName?
GENERAL SALES DATABASE:
SALESREP
SalesRepNo
RepName
HireDate
654
Jones
01/02/1999
734
Smith
02/03/2000
345
Chen
01/25/1998
434
Johnson
11/23/1998
CUSTOMER
CustNo
CustName
Balance
9870
Winston
500
8590
Gonzales
350
7840
Harris
800
4870
Miles
100
A) SELECT CustNo, CustName, RepName
FROM SALESREP, CUSTOMER;
B) SELECT CustNo, CustName, RepName
FROM SALESREP, CUSTOMER
WHERE CustNo=*;
C) SELECT CustNo, CustName, RepName
FROM SALESREP, CUSTOMER
WHERE SALEREP, SalesRepNo = CUSTOMER, SalesRepNo;
D) CREATE VIEW CustomerSalesRep AS
SELECT CustNo, CustName, RepName
FROM SALESREP, CUSTOMER
WHERE CustNo=*;
E) CREATE VIEW CustomerSalesRep AS
SELECT CustNo, CustName, RepName
FROM SALESREP, CUSTOMER
WHERE SALEREP, SalesRepNo = CUSTOMER, SalesRepNo;
page-pf6
70) SQL views are constructed from SQL ________ statements.
71) The SQL command ________ is used to create a virtual table.
72) SQL statements used to construct views cannot contain the ________ clause.
73) The SQL keyword ________ can be used with SELECT statements retrieving view instances
to sort the results of the SELECT.
74) The SQL statement ________ is used to modify a view.
75) The SQL statement ________ is used to delete a view from a database.
page-pf7
76) Since an SQL view is essentially a stored query, Microsoft Access ________ can be used to
implement SQL view equivalents.
77) Microsoft Access ________ can use previously stored view equivalent Access queries the
same way an SQL SELECT statement uses SQL views.
page-pf8
78) Use the database below to answer the following question.
GENERAL SALES DATABASE:
SALESREP
SalesRepNo
RepName
HireDate
654
Jones
01/02/1999
734
Smith
02/03/2000
345
Chen
01/25/1998
434
Johnson
11/23/1998
CUSTOMER
CustNo
CustName
Balance
9870
Winston
500
8590
Gonzales
350
7840
Harris
800
4870
Miles
100
What is an SQL view, and what is it used for? Include an example based on the CUSTOMER
table of the General Sales Database.
page-pf9
79) Use the database below to answer the following question.
GENERAL SALES DATABASE:
SALESREP
SalesRepNo
RepName
HireDate
654
Jones
01/02/1999
734
Smith
02/03/2000
345
Chen
01/25/1998
434
Johnson
11/23/1998
CUSTOMER
CustNo
CustName
Balance
9870
Winston
500
8590
Gonzales
350
7840
Harris
800
4870
Miles
100
Write the SQL statement to create a view named CustomerSalesRepView that displays the
customer name as CustomerName and the associated sales rep name SaleRepresentativeName
from the GENERAL SALES DATABASE.
page-pfa
80) Use the database below to answer the following question.
GENERAL SALES DATABASE:
SALESREP
SalesRepNo
RepName
HireDate
654
Jones
01/02/1999
734
Smith
02/03/2000
345
Chen
01/25/1998
434
Johnson
11/23/1998
CUSTOMER
CustNo
CustName
Balance
9870
Winston
500
8590
Gonzales
350
7840
Harris
800
4870
Miles
100
Using the CUSTOMERBalance column as the column providing the data, create a view to
display the results of a computed column. Specifically, assume that all customers are required to
maintain a minimum balance of 100, and use the view to display customer name and a number
named BalanceOverMinimum that calculates (Balance - 100) for all customers in the GENERAL
SALES DATABASE.
page-pfb
81) Use the database below to answer the following question.
GENERAL SALES DATABASE:
SALESREP
SalesRepNo
RepName
HireDate
654
Jones
01/02/1999
734
Smith
02/03/2000
345
Chen
01/25/1998
434
Johnson
11/23/1998
CUSTOMER
CustNo
CustName
Balance
9870
Winston
500
8590
Gonzales
350
7840
Harris
800
4870
Miles
100
Given that a view named CustomerSalesRepView that displays the customer name as
CustomerName and the associated sales rep name as SalesRepresentativeName has been created
for the GENERAL SALES DATABASE, write the SQL code to use the view to display the
customer name and associated sales rep name sorted by customer name.
82) How are SQL views handled in Microsoft Access?
page-pfc
83) You can add columns to a preexisting table using the INSERT clause in an SQL ALTER
TABLE statement.
84) The SQL MERGE statement is, effectively, the combination of the SQL INSERT and SQL
UPDATE statements.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.