DP-800 Question Preview

Safe Public Question Preview 7

Only the demo-safe public version is shown here. Correct answers, full explanations, internal IDs, and paid-only content stay protected.

Drag OrderDesign and develop database solutions
Question 7. You need to meet the database performance requirements for maintenance data How should you complete the Transact-SQL code? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point. Answer:
A. CREATE TRIGGER dbo.trgMaintenanceEvents_Updatetimestamp ON dbo.MaintenanceEvents AFTER UPDATE AS BEGIN UPDATE m SET LastModifiedutc = SYSUTCDATETIME() FROM dbo.MaintenanceEvents m INNER JOIN inserted i ON m.MaintenanceId = i.MaintenanceId WHERE m.LastModifiedutc < i.LastModifiedutc END
B. CREATE TRIGGER dbo.trgMaintenanceEvents_Updatetimestamp ON dbo.MaintenanceEvents AFTER UPDATE AS BEGIN UPDATE m SET LastModifiedutc = GETUTCDATE() FROM dbo.MaintenanceEvents m INNER JOIN inserted i ON m.MaintenanceId = i.MaintenanceId END
C. CREATE TRIGGER dbo.trgMaintenanceEvents_Updatetimestamp ON dbo.MaintenanceEvents AFTER UPDATE AS BEGIN UPDATE m SET LastModifiedutc = SYSUTCDATETIME() FROM dbo.MaintenanceEvents m INNER JOIN deleted i ON m.MaintenanceId = i.MaintenanceId END
Explanation is locked. Start the demo or unlock full access to review explanations inside the protected test engine.

Related Safe Previews

FAQ

Does this page show the answer?

No. Answers and explanations are protected inside the private test engine.