Which code segment should you use?

CORRECT TEXT
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You need to create a view named uv_CustomerFullName to meet the following requirements:
The code must NOT include object delimiters.
The view must be created in the Sales schema.
Columns must only be referenced by using one-part names.
The view must return the first name and the last name of all customers.
The view must prevent the underlying structure of the customer table from being changed.
The view must be able to resolve all referenced objects, regardless of the user’s default schema.
Which code segment should you use?
To answer, type the correct code in the answer area.

CORRECT TEXT
You have a database that contains the tables shown in the exhibit. (Click the Exhibit button.)

You need to create a view named uv_CustomerFullName to meet the following requirements:
The code must NOT include object delimiters.
The view must be created in the Sales schema.
Columns must only be referenced by using one-part names.
The view must return the first name and the last name of all customers.
The view must prevent the underlying structure of the customer table from being changed.
The view must be able to resolve all referenced objects, regardless of the user’s default schema.
Which code segment should you use?
To answer, type the correct code in the answer area.

Answer: See the explanation

Explanation:
CREATE VIEW Sales.uv_CustomerFullName
WITH SCHEMABINDING
AS
SELECT FirstName, LastName
FROM Sales.Customers

http://msdn.microsoft.com/en-us/library/ms187956.aspx



Leave a Reply 6

Your email address will not be published. Required fields are marked *


To

To

—create a view named uv_CustomerFullName—
—view must be created in the Sales schema—
CREATE VIEW Sales.uv_CustomerFullName
—view must prevent the underlying structure of the customer table from being changed
WITH SCHEMABINDING
AS
—Columns must only be referenced by using one-part names—
—view must return the first name and the last name—
SELECT FirstName, LastName
—view must be able to resolve all referenced objects—
FROM Sales.Customers

Patty

Patty

CREATE VIEW Sales.uvCustomerFullName
WITH SCHEMABINDING
AS
SELECT FirstName,
LastName
FROM Sales.Customers

wilson

wilson

CREATE VIEW Sales.uvCustomerFullName
WITH SCHEMABINDING
AS
SELECT FirstName,
LastName
FROM dbo.Customers

this is the right answer

anna

anna

Agreed. This is the right answer.