MySql创建索引时支持ASC或DESC排序。下面举例 创建表时同时创建索引降序排序(sname 字段上普通索引降序)create table tbl1 (id int unique, sname varchar(50),index tbl1_index_sname(sname desc));在已有的表创建索引语法 create [unique|fulltext|spatial] index 索引名 on 表名(字段名 [长度]...
mysql创建索引的时候支持字段的desc排序方式吗
MySql创建索引时支持ASC或DESC排序。
下面举例
创建表时同时创建索引降序排序(sname 字段上普通索引降序)
create table tbl1 (
id int unique, sname varchar(50),
index tbl1_index_sname(sname desc)
);
在已有的表创建索引语法
create [unique|fulltext|spatial] index 索引名
on 表名(字段名 [长度] [asc|desc]);2016-08-10