You use a Microsoft SQL Server 2012 database that contains a table named BlogEntry that has the
following columns:
Id is the Primary Key.
You need to append the “This is in a draft stage” string to the Summary column of the recent 10
entries based on the values in EntryDateTime.
Which Transact-SQL statement should you use?

A.
UPDATE TOP(10) BlogEntry
SET Summary.WRITE(N’ This is in a draft stage’, NULL, 0)
B.
UPDATE BlogEntry
SET Summary = CAST(N’ This is in a draft stage’ as nvarchar(max))
WHERE Id IN(SELECT TOP(10) Id FROM BlogEntry ORDER BY EntryDateTime DESC)
C.
UPDATE BlogEntry
SET Summary.WRITE(N’ This is in a draft stage’, NULL, 0) FROM (
SELECT TOP(10) Id FROM BlogEntry ORDER BY EntryDateTime DESC) AS s
WHERE BlogEntry.Id = s.ID
D.
UPDATE BlogEntry
SET Summary.WRITE(N’ This is in a draft stage’, 0, 0)
WHERE Id IN(SELECT TOP(10) Id FROM BlogEntry ORDER BY EntryDateTime DESC)
Can anyone explain this?
0
0
@see https://msdn.microsoft.com/en-us/library/ms177523%28v=sql.105%29.aspx
.WRITE (expression,@Offset,@Length)
.. Only columns of varchar(max), nvarchar(max), or varbinary(max) ..
.. If @Offset is NULL, the update operation appends expression at the end of ..
0
0
d
0
0
i think is A,
UPDATE TOP(10) production.Categories
SET description.WRITE(N’ This is good2′, NULL, 0)
0
0
sorry, is B, i was wrong.
UPDATE production.Categories
SET description = CAST(N’ This is in a draft stage’ as nvarchar(max))
WHERE categoryid IN(SELECT TOP(10) categoryid FROM production.categories
ORDER BY categoryid DES
0
0
i think D is the correct answer for this
0
0
Besides, part of that new 200Q 70-461 dumps are available here:
https://drive.google.com/open?id=0B-ob6L_QjGLpfnJldlZxTklTaHM0akpJUzhja2pETHJOS0owMzd4eVk1UTVNQUpvdlVxVWM
Best Regards!
0
0