SQL Index

1.create index index_name  table_name(name,id);

2.create table table_name(

  id int not null,

  name text,

  price int ,

  primary key(id),

  key index_name(name)

  index index_name(price)//save as above key

  

};

 

3.create table bookmark(

username varchar(16) not null,

bm_URL varchar(256) not null,

index(username),

index(bm_URL),

primary key(username,bm_URL)

)//为用户名跟URL地址创建索引,查找的时候方便快速

posted @ 2012-07-31 16:45  Epirus  阅读(155)  评论(0编辑  收藏  举报