Which Transact-SQL batch should you use?

You administer a Microsoft SQL Server 2012 databasethat 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?

You administer a Microsoft SQL Server 2012 databasethat 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.CustomerID WITH DROP
EXISTING

B.
ALTER INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerID REORGANIZE

C.
ALTER INDEX ALL ON OrderDetail REBUILD

D.
ALTER INDEX NCI_OrderDetail_CustomerID ON OrderDetail.CustomerID REBUILD

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



Leave a Reply 3

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


Brandon Langolf

Brandon Langolf

I’ve been browsing online greater than three hours these days, yet I by no means discovered any attention-grabbing article like yours. It is lovely worth sufficient for me. Personally, if all site owners and bloggers made excellent content as you did, the web will be a lot more useful than ever before. “Perfection of moral virtue does not wholly take away the passions, but regulates them.” by Saint Thomas Aquinas.

http://www.bastcilkdoptb.com/

Joseph Malle

Joseph Malle

Hi there very cool blog!! Guy .. Beautiful .. Superb .. I will bookmark your web site and take the feeds also¡KI’m happy to search out a lot of helpful information right here in the submit, we need develop more strategies on this regard, thanks for sharing. . . . . .

http://www.fxZLTAwYwf.com/fxZLTAwYwf