This example creates a clustered index, without specifying the segment name, using the same table you just created on the new_space segment in the preceding example. Check new_space after create index to verify that no objects remain on the segment:
create clustered index mytabl_cix on mytabl(c1)
sp_helpsegment new_space
segment name status ------- ------------- ------ 3 new_space 0 device size free_pages ---------------- ------ ---------- newdevice 3.0MB 1523 total_size total_pages free_pages used_pages reserved_pages ------------- ----------- ----------- ----------- -------------- 3.0MB 1536 1530 6 0
If you have placed a table on a segment, and you must create a clustered index, use the on segment_name clause, or the table migrates to the default segment.