PdfPrep.com

Which Transact-SQL batch should you use?

You administer a Microsoft SQL Server 2012 database that contains a table named OrderDetail. You discover that the NCI_OrderDetail_CustomerID non-clustered index is fragmented.

You need to reduce fragmentation. You need to achieve this goal without taking the index offline.

Which Transact-SQL batch should you use?
A . CREATE INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerIDWITH DROP EXISTING
B . ALTER INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerIDREORGANIZE
C . ALTER INDEX ALL ON OrderDetailREBUILD
D . ALTER INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerIDREBUILD

Answer: B

Exit mobile version