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.)
Explanation:
http://msdn.microsoft.com/en-us/library/ms190273.aspx
.. the answer is not completely wrong, but the other WHERE-condition should be used for sure !
Reason
====================================================
SELECT EOMONTH (@STARTDATE, -1) AS LastMonthLastDay
results for instance in
LastMonthLastDay
———————–
2011-11-30 00:00:00.000
@see http://www.mssqltips.com/sqlservertip/2588/new-date-and-time-functions-in-sql-server-2012/
The time-info in the result points always to the BEGINNING of the day of interest !
But in this case we do urgently need all data till the END of this day.
Therefore we should add 1 day to the result of EOMONTH-expression and consider all results before this point-in-time
-> i.e. ‘b.ProcessDate < dateadd(d, 1, EOMONTH(GETDATE(), -1))'
This solution is favorized by 'http://www.examcollection.com/microsoft/Microsoft.Certkiller.70-462.v2014-09-11.by.LARA.169q.vce.file.html'
I got one new question about security
I cant remember exact question, but you will understand if you see one.
You administer SQL 2012 server, only web application will connect to this server.
you need to minimize attack chance
(need to check all that apply)
1) install named database instance;
2) all services will start with same account;
3) install sql database in windows server core 2008 r2;
4) services starts automatically.
5) cant remember this one
I dont know the answers.
“only the records that were processed in the month prior to the current month…”
b.processdate < dateadd(d, 1, EOMONTH(GETDATE(), -1))
GETDATE() :returns current month
GETDATE(), -1 :returns month prior to current month
EOMONTH(GETDATE(), -1) :returns last day of month prior to current month
dateadd(d, 1, EOMONTH(GETDATE(), -1)) :returns '1 day after' previous month's last day
The information talked about within the article are a number of the most beneficial readily available.
WTF