[2016-New] GreatExam Latest Microsoft 70-457 Exam Questions Free Download (21-40)

How to 100% pass 70-457 exam? GreatExam provides the guaranteed 70-457 exam preparation material to boost up your confidence in 70-457 exam. Successful candidates have provided their reviews about our 70-457 dumps. Now GreatExam supplying the new version of 70-457 VCE and PDF dumps. We ensure our 70-457 exam questions are the most complete and authoritative compared with others’, which will ensure your 70-457 exam pass.

QUESTION 21
You develop a database for a travel application.
You need to design tables and other database objects.
You need to store media files in several tables. Each media file is less than 1 MB in size.
The media files will require fast access and will be retrieved frequently.
What should you do?

A.    Use the CAST function.
B.    Use the DATE data type.
C.    Use the FORMAT function.
D.    Use an appropriate collation.
E.    Use a user-defined table type.
F.    Use the VARBINARY data type.
G.    Use the DATETIME data type.
H.    Use the DATETIME2 data type.
I.    Use the DATETIMEOFFSET data type.
J.    Use the TODATETIMEOFFSET function.

Answer: F
Explanation:
http://msdn.microsoft.com/en-us/library/ms188362.aspx

QUESTION 22
You develop a database for a travel application.
You need to design tables and other database objects.
You create a view that displays the dates and times of the airline schedules on a report.
You need to display dates and times in several international formats.
What should you do?

A.    Use the CAST function.
B.    Use the DATE data type.
C.    Use the FORMAT function.
D.    Use an appropriate collation.
E.    Use a user-defined table type.
F.    Use the VARBINARY data type.
G.    Use the DATETIME data type.
H.    Use the DATETIME2 data type.
I.    Use the DATETIMEOFFSET data type.
J.    Use the TODATETIMEOFFSET function.

Answer: C
Explanation:
http://msdn.microsoft.com/en-us/library/hh213505.aspx

QUESTION 23
You have three tables that contain data for vendors, customers, and agents.
You create a view that is used to look up telephone numbers for these companies.
The view has the following definition:
231
You need to ensure that users can update only the phone numbers by using this view.
What should you do?

A.    Alter the view.
Use the EXPAND VIEWS query hint along with each SELECT statement.
B.    Drop the view.
Re-create the view by using the SCHEMABINDING clause, and then create an index on the view.
C.    Create an AFTER UPDATE trigger on the view.
D.    Create an INSTEAD OF UPDATE trigger on the view.

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

QUESTION 24
You develop a Microsoft SQL Server 2012 database that contains tables named Employee and Person. The tables have the following definitions:
241
You create a view named VwEmployee as shown in the following Transact-SQL statement.
242
Users are able to use single INSERT statements or INSERT…SELECT statements into this view. You need to ensure that users are able to use a single statement to insert records into both Employee and Person tables by using the VwEmployee view.
Which Transact-SQL statement should you use?
243

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: B

QUESTION 25
You are a database developer of a Microsoft SQL Server 2012 database.
You are designing a table that will store Customer data from different sources.
The table will include a column that contains the CustomerID from the source system and a column that contains the SourceID.
A sample of this data is as shown in the following table.
251
You need to ensure that the table has no duplicate CustomerID within a SourceID.
You also need to ensure that the data in the table is in the order of SourceID and then CustomerID.
Which Transact- SQL statement should you use?
252

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: D

QUESTION 26
You develop a Microsoft SQL Server 2012 database that contains a table named Products.
The Products table has the following definition:
261
You need to create an audit record only when either the RetailPrice or WholeSalePrice column is updated.
Which Transact-SQL query should you use?

A.    CREATE TRIGGER TrgPriceChange ON Products FOR UPDATE ASIF CCLUMNS_CHANGED(RetailPrice, WholesalePrice)- – Create Audit Records
B.    CREATE TRIGGER TrgPriceChange ON Products FOR UPDATE ASIF EXISTS(SELECT RetailPrice from inserted) OREXISTS (SELECT WholeSalePnce FROM inserted)- – Create Audit Records
C.    CREATE TRIGGER TrgPriceChange ON Products FOR UPDATE ASIF COLUMNS_UPDATED(RetailPrice, WholesalePrice)- – Create Audit Records
D.    CREATE TRIGGER TrgPriceChange ON Products FOR UPDATE ASIF UPDATE(RetailPrice) OR UPDATE(WholeSalePrice)- – Create Audit Records

Answer: D
Explanation:
http://msdn.microsoft.com/en-us/library/bb510663.aspx
http://msdn.microsoft.com/en-us/library/ms186329.aspx

QUESTION 27
A table named Profits stores the total profit made each year within a territory.
The Profits table has columns named Territory, Year, and Profit.
You need to create a report that displays the profits made by each territory for each year and its previous year.
Which Transact-SQL query should you use?
271

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/hh231256.aspx
http://msdn.microsoft.com/en-us/library/hh213125.aspx

QUESTION 28
You use Microsoft SQL Server 2012 database to develop a shopping cart application.
You need to rotate the unique values of the ProductName field of a table-valued expression into multiple columns in the output.
Which Transact-SQL operator should you use?

A.    CROSS JOIN
B.    CROSS APPLY
C.    PIVOT
D.    UNPIVOT

Answer: C
Explanation:
http://technet.microsoft.com/en-us/library/ms177634.aspx

QUESTION 29
You administer a Microsoft SQL Server database that supports a shopping application.
You need to retrieve a list of customers who live in territories that do not have a sales person. Which Transact-SQL query or queries should you use? (Each correct answer presents a complete solution. Choose all that apply.)

A.    SELECT CustomerID FROM Customer WHERE TerritoryID <> SOME(SELECT TerritoryID FROM Salesperson)
B.    SELECT CustomerID FROM Customer WHERE TerritoryID <> ALL(SELECT TerritoryID FROM Salesperson)
C.    SELECT CustomerID FROM Customer WHERE TerritoryID <> ANY(SELECT TerritoryID FROM Salesperson)
D.    SELECT CustomerID FROM Customer WHERE TerritoryID NOT IN(SELECT TerritoryID FROM Salesperson)

Answer: BD

QUESTION 30
You support a database structure shown in the exhibit. (Click the Exhibit button.)
301
You need to write a query that displays the following details:
– Total sales made by sales people, year, city, and country
– Sub totals only at the city level and country level
– A grand total of the sales amount
Which Transact-SQL query should you use?
302

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: C
Explanation:
The question about BlogEntry is wrong. We need to “append” the text, with the query proposal in the answer, we overwrite the whole string. The correct answer to this question is C.
http://www.grapefruitmoon.net/diving-into-t-sql-grouping-sets/
http://msdn.microsoft.com/en-us/library/ms177673.aspx

QUESTION 31
You are developing a database that will contain price information.
You need to store the prices that include a fixed precision and a scale of six digits.
Which data type should you use?

A.    Float
B.    Money
C.    Smallmoney
D.    Numeric

Answer: D
Explanation:
Numeric is the only one in the list that can give a fixed precision and scale.
http://msdn.microsoft.com/en-us/library/ms179882.aspx

QUESTION 32
You administer a Microsoft SQL Server database that supports a banking transaction management application.
You need to retrieve a list of account holders who live in cities that do not have a branch location. Which Transact-SQL query or queries should you use? (Each correct answer presents a complete solution. Choose all that apply.)

A.    SELECT AccountHolderIDFROM AccouritHolderWHERE CityID NOT IN (SELECT CityID FROM BranchMaster)
B.    SELECT AccountHolderIDFROM AccountHolderWHERE CityID <> ALL (SELECT CityID FROM BranchMaster)
C.    SELECT AccountHolderlDFROM AccouncHolderWHERE CityID <> SOME (SELECT CityID FROM BranchMaster]
D.    SELECT AccountHolderIDFROM AccountHolderWHERE CityID <> ANY (SELECT CityID FROM BranchMaster)

Answer: AB
Explanation:
http://msdn.microsoft.com/en-us/library/ms188047.aspx
http://msdn.microsoft.com/en-us/library/ms177682.aspx
http://msdn.microsoft.com/en-us/library/ms173545.aspx

QUESTION 33
You administer a Microsoft SQL Server 2012 database. The database contains a table named Employee. Part of the Employee table is shown in the exhibit. (Click the Exhibit button.)
331
332
Confidential information about the employees is stored in a separate table named EmployeeData. One record exists within EmployeeData for each record in the Employee table.
You need to assign the appropriate constraints and table properties to ensure data integrity and visibility. On which column in the Employee table should you a create a unique constraint?

A.    DateHired
B.    DepartmentID
C.    EmployeelD
D.    EmployeeNum
E.    FirstName
F.    JobTitle
G.    LastName
H.    MiddleName
I.    ReportsToID

Answer: D

QUESTION 34
You administer a Microsoft SQL Server 2012 database. The database contains a table named Employee. Part of the Employee table is shown in the exhibit. (Click the Exhibit button.)
341
342
Confidential information about the employees is stored in a separate table named EmployeeData. One record exists within EmployeeData for each record in the Employee table.
You need to assign the appropriate constraints and table properties to ensure data integrity and visibility. On which column in the Employee table should you use an identity specification to include a seed of 1,000 and an increment of 1?

A.    DateHired
B.    DepartmentID
C.    EmployeeID
D.    EmployeeNum
E.    FirstName
F.    JobTitle
G.    LastName
H.    MiddleName
I.    ReportsToID

Answer: C

QUESTION 35
You administer a Microsoft SQL Server 2012 database that includes a table named Products. The Products table has columns named Productld, ProductName, and CreatedDateTime.
The table contains a unique constraint on the combination of ProductName and CreatedDateTime. You need to modify the Products table to meet the following requirements:
– Remove all duplicates of the Products table based on the ProductName column.
– Retain only the newest Products row.
Which Transact-SQL query should you use?

A.    WITH CTEDupRecords
AS
(
  SELECT MAX(CreatedDateTime) AS CreatedDateTime, ProductName
  FROM Products
  GROUP BY ProductName
  HAVING COUNT(*) > 1
)
DELETE p
FROM Products p
JOIN CTEDupRecords cte ON
p.ProductName = cte.ProductName
AND p.CreatedDateTime > cte.CreatedDateTime
B.    WITH CTEDupRecords
AS
(
  SELECT MAX(CreatedDateTime) AS CreatedDateTime, ProductName
  FROM Products
  GROUP BY ProductName
  HAVING COUNT(*) > 1
)
DELETE p
FROM Products p
JOIN CTEDupRecords cte ON
cte.ProductName = p.ProductName
AND cte.CreatedDateTime > p.CreatedDateTime
C.    WITH CTEDupRecords
AS
(
  SELECT MIN(CreatedDateTime) AS CreatedDateTime, ProductName
  FROM Products
  GROUP BY ProductName
)
DELETE p
FROM Products p
JOIN CTEDupRecords cte ON
p.ProductName = cte.ProductName
D.    WITH CTEDupRecords
AS
(
  SELECT MAX(CreatedDateTime) AS CreatedDateTime, ProductName
  FROM Products
  GROUP BY ProductName
  HAVING COUNT(*) > 1
)
DELETE p
FROM Products p
JOIN CTEDupRecords cte ON
p.ProductName = cte.ProductName

Answer: B

QUESTION 36
You develop three Microsoft SQL Server 2012 databases named Database1, Database2, and Database3.
You have permissions on both Database1 and Database2.
You plan to write and deploy a stored procedure named dbo.usp_InsertEvent in Database3. dbo.usp_InsertEvent must execute other stored procedures in the other databases.
You need to ensure that callers that do not have permissions on Database1 or Database2 can execute the stored procedure.
Which Transact-SQL statement should you use?

A.    USE Database2
B.    EXECUTE AS OWNER
C.    USE Database1
D.    EXECUTE AS CALLER

Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/ms188354.aspx
http://blog.sqlauthority.com/2007/10/06/sql-server-executing-remote-stored-procedure-calling-stored-procedure-on-linked-server/

QUESTION 37
You administer a Microsoft SQL Server 2012 database that has multiple tables in the Sales schema.
Some users must be prevented from deleting records in any of the tables in the Sales schema.
You need to manage users who are prevented from deleting records in the Sales schema.
You need to achieve this goal by using the minimum amount of administrative effort.
What should you do?

A.    Create a custom database role that includes the users.
Deny Delete permissions on the Sales schema for the custom database role.
B.    Include the Sales schema as an owned schema for the db_denydatawriter role.
Add the users to the db_denydatawriter role.
C.    Deny Delete permissions on each table in the Sales schema for each user.
D.    Create a custom database role that includes the users.
Deny Delete permissions on each table in the Sales schema for the custom database role.

Answer: A

QUESTION 38
You administer a Microsoft SQL Server 2012 database.
The database contains a Product table created by using the following definition:
381
You need to ensure that the minimum amount of disk space is used to store the data in the Product table.
What should you do?

A.    Convert all indexes to Column Store indexes.
B.    Implement Unicode Compression.
C.    Implement row-level compression.
D.    Implement page-level compression.

Answer: D
Explanation:
http://msdn.microsoft.com/en-us/library/cc280449.aspx
http://msdn.microsoft.com/en-us/library/cc280464.aspx
http://msdn.microsoft.com/en-us/library/cc280576.aspx
http://msdn.microsoft.com/en-us/library/ee240835.aspx

QUESTION 39
You generate a daily report according to the following query:
391
You need to improve the performance of the query.
What should you do?
392

A.    Option A
B.    Option B
C.    Option C
D.    Option D

Answer: A

QUESTION 40
You administer a Microsoft SQL Server 2012 database named ContosoDb.
Tables are defined as shown in the exhibit. (Click the Exhibit button.)
401
You need to display rows from the Orders table for the Customers row having the CustomerId value set to 1 in the following XML format:
<row OrderId=”1″ OrderDate=”2000-01-01T00:00:00″ Amount=”3400.00″ Name=”Customer A” Country=”Australia” /><row
OrderId=”2″ OrderDate=”2001-01-01T00:00:00″ Amount=”4300.00″ Name=”Customer A” Country=”Australia” />
Which Transact-SQL query should you use?

A.    SELECT OrderId, OrderDate, Amount, Name, Country
FROM Orders INNER JOIN Customers ON Orders.CustomerId = Customers.CustomerId
WHERE Customers.CustomerId = 1
FOR XML RAW
B.    SELECT OrderId, OrderDate, Amount, Name, Country
FROM Orders INNER JOIN Customers ON Orders.CustomerId = Customers.CustomerId
WHERE Customers.CustomerId = 1
FOR XML RAW, ELEMENTS
C.    SELECT OrderId, OrderDate, Amount, Name, Country
FROM Orders INNER JOIN Customers ON Orders.CustomerId = Customers.CustomerId
WHERE Customers.CustomerId = 1
FOR XML AUTO
D.    SELECT OrderId, OrderDate, Amount, Name, Country
FROM Orders INNER JOIN Customers ON Orders.CustomerId – Customers.CustomerId
WHERE Customers.CustomerId= 1
FOR XML AUTO, ELEMENTS
E.    SELECT Name, Country, OrderId, OrderDate, Amount
FROM Orders INNER JOIN Customers ON Orders.CustomerId=Customers.CustomerId
WHERE Customers.CustomerId- 1
FOR XML AUTO
F.    SELECT Name, Country, Orderld, OrderDate, Amount
FROM Orders INNER JOIN Customers ON Orders.CustomerId=Customers.CustomerId
WHERE Customers.CustomerId= 1
FOR XML AUTO, ELEMENTS
G.    SELECT Name AS ‘@Name’, Country AS ‘@Country’, OrderId, OrderDate, Amount
FROM Orders INNER JOIN Customers ON Orders.CustomerId= Customers.CustomerId
WHERE Customers.CustomerId= 1
FOR XML PATH (‘Customers’)
H.    SELECT Name AS ‘Customers/Name’, Country AS ‘Customers/Country’, OrderId,OrderDate, Amount
FROM Orders INNER JOIN Customers ON Orders.CustomerId= Customers.CustomerId
WHERE Customers.CustomerId= 1
FOR XML PATH (‘Customers’)

Answer: A
Explanation:
http://msdn.microsoft.com/en-us/library/bb510464.aspx

All the 70-457 braindumps are updated. Get a complete hold of 70-457 PDF dumps and 70-457 practice test with free VCE player through GreatExam and boost up your skills.

http://www.greatexam.com/70-457-exam-questions.html

         

Comments are closed.