You develop a Microsoft SQL Server 2012 database that contains a heap named OrdersHistoncal.
You write the following Transact-SQL query:
INSERT INTO OrdersHistorical
SELECT * FROM CompletedOrders
You need to optimize transaction logging and locking for the statement. Which table hint should you
use?
A.
HOLDLOCK
B.
ROWLOCK
C.
XLOCK
D.
UPDLOCK
E.
TABLOCK
Explanation:
http://technet.microsoft.com/en-us/library/ms189857.aspx
http://msdn.microsoft.com/en-us/library/ms187373.aspx
E
MSDN -> INSERT -> Best Practices -> Best Practices for Bulk Importing Data
https://msdn.microsoft.com/en-us/library/ms174335.aspx#Anchor_2
e