PrepAway - Latest Free Exam Questions & Answers

What actions should you execute?

Diagram:-
Column name Type

ClientID int

CompanyName varchar(50)

FirstName varchar(20)

LastName varchar(20)

Picture varbinary(max)

Address1 varchar(30)

Address2 varchar(30)

City varchar(30)

StateProvince char(2)

PostalCode varchar(10)

CountryCode char(2)
You work as a database administrator at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. The Domain.com network contains a SQL Server 2005 database named Certkiller -DB01.
Certkiller -DB01 contains a table named CK_Clients. The CK_Clients table comprises of the columns that are illustrated in the diagram. You have received instruction from the CIO to create a view named v_Client by using the following Transact-SQL statement:
CREATE VIEW v_ClientASSELECT ClientID, CompanyName, FirstName, LastName,
PictureFROM Clients
You want to create an index on the v_Client view.
You need to modify the Transact-SQL statement before he creates the index. What actions should you execute? (Choose all that apply)

PrepAway - Latest Free Exam Questions & Answers

A.
You need to include the WITH SCHEMABINDING clause in order for you to modify the Transact-SQL statement.

B.
The index can only be created in the v_Client view if the Picture column is changed to an image data type.

C.
You need to select the columns using the * notation.

D.
You need to include the schema name with the table name.

Explanation:
The Syntax for the CREATE VIEW is:
CREATE VIEW [schema_name . ] view_name [(column [ ,…n ] ) ] [WITH <view_attribute> [ ,…n ] ]
AS selected_statement [ ; ]
[ WITH CHECK OPTION]
<view_attribute ::=
{
[ ENCRYPTION ]
[ SCHEMABINDING ]
[ VIEW_METADATA ] }
When you indicate the SCHEMABINDING option, you are unable to 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.


Leave a Reply