index
-
SVb.net wrote:
what's different between index and primarykey?
1.
Primary Key
Is AUNIQUE Constraint
created against the table to uniquely identify each record in the table. 2. A table can have onlyone PRIMARY KEY constraint
. 3. PRIMARY KEY constraint automatically creates Clustered Index against the Column. Physical order of rows is the same as the indexed order of the rows. 1.AnIndex
is aUNIQUE Reference
internally created by the Database engine against the Table or View for reference. 2. A table can have250 Indexes
(1 Clustered and 249 Non-Clustered). 3. Physical order of the rows is independent of their indexed order for Non-Clustered Indexes.- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
-
SVb.net wrote:
what's different between index and primarykey?
1.
Primary Key
Is AUNIQUE Constraint
created against the table to uniquely identify each record in the table. 2. A table can have onlyone PRIMARY KEY constraint
. 3. PRIMARY KEY constraint automatically creates Clustered Index against the Column. Physical order of rows is the same as the indexed order of the rows. 1.AnIndex
is aUNIQUE Reference
internally created by the Database engine against the Table or View for reference. 2. A table can have250 Indexes
(1 Clustered and 249 Non-Clustered). 3. Physical order of the rows is independent of their indexed order for Non-Clustered Indexes.- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
-
John Prabhu wrote:
Clustered Index against the Column
what does it mean? can you please explain in details ?
Becoming Programmer...
xmen_xwk wrote:
can you please explain in details ?
Initially when a new table is created, there is no index created by default. As I said in the previous post that an Index is a
Reference
created by the Database engine for reference, Just like anIndex
in the book to locate the information. there are 2 types of Indexes created in an Sql Server table -Clustered
andNon-Clustered
. As I said that When you create a Primary key on a table, By default a clustered Index is created on the table. AClustered Index
is similar to adictionary
. In a dictionary, the words are organized and sorted alphabetically. Same way on Clustered Index Column therecords are sorted
in the same order as the indexed order of the rows.- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
-
xmen_xwk wrote:
can you please explain in details ?
Initially when a new table is created, there is no index created by default. As I said in the previous post that an Index is a
Reference
created by the Database engine for reference, Just like anIndex
in the book to locate the information. there are 2 types of Indexes created in an Sql Server table -Clustered
andNon-Clustered
. As I said that When you create a Primary key on a table, By default a clustered Index is created on the table. AClustered Index
is similar to adictionary
. In a dictionary, the words are organized and sorted alphabetically. Same way on Clustered Index Column therecords are sorted
in the same order as the indexed order of the rows.- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.