直接创建索引
create index index_name on lin(column(length));
修改表结构并且添加索引
alter table index_name add index index_name (column(length));
创建表并添加索引
create table lin(
lin_id int not null auto_increment,
tit char(255) character set utf8 collate utf8_general_ci not null ,
content text charcter set utf8 collate utf8_general_ci null ,
time int null default null ,
primary key(id),
index index_name (title(length))
);
删除索引
drop table index_name on lin
唯一索引
create unique index index_name on lin(column(length));