What set of Transact-SQL statements should you run?

Posted by: Pdfprep Category: 70-761 Tags: , ,

Note: This question is part of a series of questions that use the same scenario. For your convenience, the scenario is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is exactly the same in each question in this series.

You query a database that includes two tables: Project and Task.

The Project table includes the following columns:

The Task table includes the following columns:

You plan to run the following query to update tasks that are not yet started:

UPDATE Task SET StartTime = GETDATE () WHERE StartTime IS NULL

You need to return the total count of tasks that are impacted by this UPDATE operation, but are not

associated with a project.

What set of Transact-SQL statements should you run?

A)

B)

C)

D)

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

Answer: B

Explanation:

The WHERE clause of the third line should be WHERE ProjectID IS NULL, as we want to count the tasks that are not associated with a project.

Leave a Reply

Your email address will not be published.