昌乐二中能不能带手机:请问建立索引的实际操作

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/01 08:26:16
我先建立一个表.
create table table(
id int not null primary key;
name char(20);
);
如何对id 建立索引? 请给出实际例子, 谢谢.

create unique clustered index 索引名 on 表(在哪个字段)
unique 唯一的意思
用的时候
select * from 表(index=索引名)
删除的时候
drop index 表.索引名