Exhibit:
You use a SQL Server 2005 database that contains a table named Customers. The Customers table contains the columns displayed in the exhibit. You create a view named v_Customer by using the following Transact-SQL statement. CREATE VIEW v_CustomerASSELECT CustomerID, CompanyName, FirstName, LastName, PictureFROM Customers You want to create an index on the v_Customer view. Prior to creating the index, you need to modify the Transact-SQL statement. Which two actions should you perform? (Each correct answer presents part of the solution.Choose two.)
A.
Change the Picture column to an image data type.
B.
Include the schema name with the table name.
C.
Include the WITH SCHEMABINDING clause.
D.
Select all columns by using the * notation.
Explanation:
The Syntax for the CREATE VIEW is:
CREATE VIEW [schema_name . ] view_name [(column [ ,…n ] ) ] [WITH [ ,…n ] ]
AS selected_statement [ ; ]
[ WITH CHECK OPTION]
{
[ ENCRYPTION ]
[ SCHEMABINDING ]
[ VIEW_METADATA ] }
When you specify the SCHEMABINDING option, you cannot drop any tables, views, or functions referenced by the view without first dropping the view. Using schemas and including the schema name with the table is good practice since schemas and users now are separate entities.