select * from pleary;
# 创建索引的语法:
# unique 唯一索引
# fulltext 全文索引
# spatial 空间索引
# (index_col_name, ...) 对那些字段创建索引
create [unique|fulltext|spatial] index index_name
on tbl_name (index_col_name, ...)
#eg:
creat index email_index on fast (email) 为fast表的email列创建索引
show index from fast 查看索引
drop index email_index on fast/表名 删除索引
#修改表结构时创建索引:
alter table fast index email_index (email/name字段)
fast的由于添加了索引,查询特别快。
创建视图
使用creat view命令创建视图。
create view top10
AS
select * from player order by level desc limit 10;