I am trying to get the difference between clustered
and nonclustered
indexes. I want to show that this indexes place rows in different order in table. But my query always shows the same result:
CREATE TABLE test_table (ID tinyint)
GO
INSERT INTO test_table VALUES (2), (1), (3)
--CREATE UNIQUE CLUSTERED INDEX Clustered_Index
CREATE INDEX Nonclustered_Index
ON test_table (ID);
GO
SELECT *
FROM test_table;
GO
DROP TABLE test_table;
GO
What I have to do to fix this difference?