- 论坛徽章:
- 0
|
1> create table tab(id int,name varchar(30),constraint pk primary key(id))
2> go
1> create clustered index idx on tab(name)
2> go
Msg 1902, Level 16, State 2:
Server 'SYB_SRV', Line 1:
Cannot create more than one clustered index on table 'tab'. Drop the existing clustered index 'pk' before creating
another
1> alter table tab drop constraint pk
2> go
1> create unique index pk on tab(id)
2> go
1> create clustered index idx on tab(name)
2> go
Non-clustered index (index id = 2) is being rebuilt. |
|