Create DATABASE Myindexdemo Go Use Myindexdemo Go CREATE TABLE ABC ( A int NOT NULL, B Char (10), C varchar (10) ) Go INSERT INTO ABC Select 1, ' B ', ' C ' Union Select 5, ' B ', ' C ' Union Select 7, ' B ', ' C ' Union Select 9, ' B ', ' C ' GoSELECT * FROM ABC --Create a clustered index on the ABC table Create clustered Index Clu_abc On ABC (A) --View Index Sp_helpindex ABC --Inserting data INSERT INTO ABC VALUES (2, ' B ', ' C ') --the physical structure of the entire table has changed because of the clustered index --The contents of this index query are: SELECT * from ABC (index = NONCLU_ABC) --After dropping the index Drop index ABC. Clu_abc --Query content in physical order or in order SELECT * FROM ABC --Create a nonclustered index on the ABC table Create nonclustered index NONCLU_ABC On ABC (A) --View Index Sp_helpindex ABC --Inserting data INSERT INTO ABC VALUES (4, ' B ', ' C ') --the physical structure of the entire table has changed because of the clustered index --At this point the contents of the query are: SELECT * from ABC (index = NONCLU_ABC) --After dropping the index Drop index ABC. Nonclu_abc --The physical order of the query content is in the order of insertion SELECT * FROM ABC |