1.float类型 float列类型默认长度查不到结果.必须指定精度. 比方 num float, insert into table (num) values (0.12); select * from table where num=0.12的话.empty set. num float(9,7), insert into table (num) values (0.12); select * from table where num=0.12的话会查到这条记录. mysql> create…
索引是快速搜索的关键.MySQL索引的建立对于MySQL的高效运行是很重要的.下面介绍几种常见的MySQL索引类型 在数据库表中,对字段建立索引可以大大提高查询速度.假如我们创建了一个 mytable表: CREATE TABLE mytable( ID INT NOT NULL, username VARCHAR(16) NOT NULL );我们随机向里面插入了10000条记录,其中有一条:5555, admin.在查找username="admin"的记录 SELECT * FR…