如果一个表,不建聚集索引,那个记录的物理顺序如何确定呢?
------------------------------
我知道,是聚集索引决定记录的物理顺序,但是一个表,可以什么索引都没有,这时,
物理顺序是根据什么定的呢?
难道是随机的顺序???

解决方案 »

  1.   

    帮助中与sql server的书都未说明,估计是按添加记录的先后排列吧.
      

  2.   

    create table tb(id int,col1 varchar(10))
    go
    insert into tb select 5,'abcd'
    insert into tb select 10,'dirw'
    insert into tb select 3,'8fwe'
    insert into tb select 1,'dr239s'
    insert into tb select 8,'823nsd'
    go
    select * from tb
    go
    drop table tb
    /*
    id          col1
    ----------- ----------
    5           abcd
    10          dirw
    3           8fwe
    1           dr239s
    8           823nsd(5 行受影响)
    */