待整理
5.索引:
1.定义:一种数据对象
2.作用:提供查询速度
3.创建方式:
1.自动创建:primary key,unique
2.手动创建:create index
1.添加主键索引:alter table 表名 add primary key (列名)
2.语法:create [unique|fulltext|spatial] index index_name [using index_type] on tb1_name(index_co1_name,···) index_co1_name: co1_name [(length)] [ASC|DESC]
3.例句:create index index_abc on tb_student(stu_sub,name)
4.删除:
1.普通索引:alter table 表名 drop index 索引名
2.主键索引&#x