Which four Transact-SQL statements should you use?

DRAG DROP
You want to add a new GUID column named BookGUID to a table named dbo.Book that already
contains data.
BookGUID will have a constraint to ensure that it always has a value when new rows are inserted
into dbo.Book. You need to ensure that the new column is assigned a GUID for existing rows. Which
four Transact-SQL statements should you use? (To answer, move the appropriate SQL statements
from the list of statements to the answer area and arrange them in the correct order.)

DRAG DROP
You want to add a new GUID column named BookGUID to a table named dbo.Book that already
contains data.
BookGUID will have a constraint to ensure that it always has a value when new rows are inserted
into dbo.Book. You need to ensure that the new column is assigned a GUID for existing rows. Which
four Transact-SQL statements should you use? (To answer, move the appropriate SQL statements
from the list of statements to the answer area and arrange them in the correct order.)

Answer:

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



Leave a Reply 3

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


gerald

gerald

I think the answetr is wrong. The last part of the answer should be:
WHERE b.ProcessDate >= dateadd(d,1,EOMONTH(GETDATE(),-2))
AND b.ProcessDate EOMONTH(GETDATE(),-2)) = 05.31.2016
=> dateadd(d,1,EOMONTH(GETDATE(),-2)) = 06.01.2016

THE AND PART evaluates to:
(GETDATE(),-1)) = 06.19.2016
=> EOMONTH(GETDATE(),-1)) = 06.30.2016
=> dateadd(d,1,EOMONTH(GETDATE(),-1)) = 07.01.2016

Therefore:
WHERE b.ProcessDate >= 06.01.2016 AND < 07.01.2016

Dan

Dan

70-461 question….