
ignore previous one,
clustered index allows duplicate records, below is example where i tried
--create table tuc(a int,b varchar(50),c varchar(50))
--insert into tuc select 4,'c','a'
--union select 99,'v','b' union select 30,'fg','h' union select 96,'g','gg'
--union select 94,'g','gg' union select 4,'c','a'
--insert into tuc select 4,'c','a' union select 41,'c','a'
--and output for select * from tuc
columns a b c
4 c a
30 fg h
94 g gg
96 g gg
99 v b
4 c a
41 c a
--create clustered index clus_indx on tuc (a)
now see check the table records. after creating clustered index on column a, select * from tuc
so clustered index allows duplicates and now again i am inserting records
--insert into tuc select 4,'c','a' union select 78,'v','c' union select 55,'v','b' union select 94,'g','gg'
--select * from tuc
Below is output and records r reordered automatically
columns a b c
4 c a
4 c a
4 c a
30 fg h
41 c a
55 v b
78 v c
94 g gg
94 g gg
96 g gg
99 v b
------------------
from above example,suppose a clustered index column have 1 to 100 records, these 100 records are there in 2 pages. Each page has 50 records in the database.
If i insert 50th duplicate record into this column, these duplicated record will be inserted in middle, as per records order.
100th record will be moved to the 3rd page.
Mark as Answer if its helpful to you
---
Srihari
Sriharim, if this helps please login to Mark As Answer. | Alert Moderator