Chapter 13 Flashcards
Which statement do you use to modify an existing view?
ALTER VIEW
The WITH CHECK option of the CREATE VIEW statement
prevents an update from being performed through the view if it causes a row to no longer be included in the view
Which of the following should you use to select the columns for a view in the View Designer?
Diagram pane
One way to examine the system objects that define a database is to use
catalog views
The statement
CREATE VIEW Example3
AS
SELECT *
FROM Invoices;
will create an updatable view
A common table expression (CTE) creates a temporary _____________ that can be used by a query that follows.
table
Which of the following can you use to create or modify a view in SQL Server Management Studio?
View Designer
By default,
columns in a view are given the same names as the columns in the base tables
The WITH SCHEMABINDING clause of the CREATE VIEW statement
protects the view by binding it to the database schema
prevents the tables that the view is based on from being deleted
prevents the tables that the view is based on from being modified in a way that affects the view
A correlated subquery is one that
is executed once for each row in the outer query
All of the system objects that define a database are stored in
a system catalog
Which statement do you use to delete an existing view?
DROP VIEW
Each of the following is a benefit provided by using views except for one. Which one is it?
You can simplify data retrieval by hiding multiple join conditions.
You can provide secure access to data by creating views that provide access only to certain columns or rows.
You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view.
You can create custom views to accommodate different needs.
You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view.
The SELECT statement for a view
can use the ORDER BY clause if it also uses the TOP clause
The statement
CREATE VIEW Example4
AS
SELECT *
FROM Invoices JOIN Vendors ON Invoices.VendorID = Vendors.VendorID
WHERE InvoiceTotal - PaymentTotal - CreditTotal > 0;
will fail because the SELECT statement returns two columns named VendorID