Can we create non-clustured index on a clustered index ?
Answer Posted / andrew g avelin
Clustered indexes sort and store the data rows in the table
based on their key values. There can only be one clustered
index per table, because the data rows themselves can only
be sorted in one order. For more information about
clustered index architecture
A nonclustered index contains the index key values and row
locators that point to the storage location of the table
data
---------------
when you create a clustered index It sorts data physically
which is not same with non-clustured index, this is the
reason why there can be only one clustered index per table
and multiple non-clustered index.
---------------
Both indexes work as B-Tree structure .
But clustered index store actual data in leaf level node
and non - clustered index stored row pointer
-----------------
For a clustered index, the database will sort the table's
records according to the column (or columns) specified by
the index. A clustered index contains all of the data for a
table in the index, sorted by the index key, just like a
phone book is sorted by name and contains all of the
information for the person inline. The nonclustered indexes
contain only the index key and a reference to find the
data, which is more like a book index. A book index stores
words in order with a reference to the page numbers where
the word is located. You can only create one clustered
index on each table.
---------------------
Clustered indexes are created usally when we create Primary
key.Atmost we can have only one clustered index
Non clustered indexes are created on the table columns
We can have maximum of 241
| Is This Answer Correct ? | 12 Yes | 3 No |
Post New Answer View All Answers
What is the largest value that can be stored in a byte data field?
Why query optimization is needed?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
What is a trigger in sql?
Is merge a dml statement?
What is sql table?
what is 'mysqladmin' in mysql? : Sql dba
how would concatenate strings in mysql? : Sql dba
What is difference between sql and oracle?
is mysql query is case sensitive? : Sql dba
What is cascade in sql?
What are the different parts of a package?
Name three sql operations that perform a sort.
How do I save the results of sql query in a file?
What does the sign mean in sql?