mysql 的isam引擎不支持int字段遞減

mysql> create table use1 
( 
userid int(10) not null unique primary key auto_increment, 
username varchar(10) not null, 
passwd varchar(20) not null, 
info text, 
unique index index_uid(userid desc), 
index index_user (username,passwd), 
fulltext index index_info(info))engine = myisam;

ERROR 1178 (42000): The storage engine for the table doesn't support descending indexes

解決方法,換成innodb引擎後就可以使用了。

 

mysql> create table use4 
( 
   userid int(10) not null unique primary key auto_increment,
   username varchar(10) not null, 
   passwd varchar(20) not null, info text,
   unique index index_uid(userid desc),
   index index_user (username,passwd),
   fulltext index index_info(info))engine = innodb;


Query OK, 0 rows affected, 1 warning (0.20 sec)


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章