You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine.
w
https://dev.mysql.com/doc/refman/5.7/en/create-index.html

MySQL :: MySQL 5.7 Reference Manual :: B.5.4.3 Problems with NULL Values
https://dev.mysql.com/doc/refman/5.7/en/problems-with-null.html
You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine. Otherwise, you must declare an indexed column NOT NULL, and you cannot insert NULL into the column.
MySQL :: MySQL 5.7 Reference Manual :: 14.1.14 CREATE INDEX Syntax
https://dev.mysql.com/doc/refman/5.7/en/create-index.html
The MyISAM, InnoDB, NDB, and ARCHIVE storage engines support spatial columns such as (POINT and GEOMETRY. (Section 12.5, “Extensions for Spatial Data”, describes the spatial data types.) However, support for spatial column indexing varies among engines. Spatial and nonspatial indexes are available according to the following rules.
Spatial indexes (created using SPATIAL INDEX) have these characteristics:
Characteristics of nonspatial indexes (created with INDEX, UNIQUE, or PRIMARY KEY):
Permitted for any storage engine that supports spatial columns except
ARCHIVE.Columns can be
NULLunless the index is a primary key.For each spatial column in a non-
SPATIALindex exceptPOINTcolumns, a column prefix length must be specified. (This is the same requirement as for indexedBLOBcolumns.) The prefix length is given in bytes.The index type for a non-
SPATIALindex depends on the storage engine. Currently, B-tree is used.You can add an index on a column that can have
NULLvalues only forInnoDB,MyISAM, andMEMORYtables.You can add an index on a
BLOBorTEXTcolumn only for using theInnoDBandMyISAMtables.When the
innodb_stats_persistentsetting is enabled, run theANALYZE TABLEstatement for anInnoDBtable after creating an index on that table.
You can add an index on a column that can have NULL values if you are using the MyISAM, InnoDB, or MEMORY storage engine.的更多相关文章
- Java ArrayList add(int index, E element) example
Simple add() method is used for adding an element at the end of the list however there is another va ...
- MongoDB Sort op eration used more than the maximum 33554432 bytes of RAM. Add an index, or speci fy a smaller limit.
最近在获取mongodb某个集合的数据过程中,在进行排序的过程中报错,具体报错信息如下: Error: error: { , "errmsg" : "Executor e ...
- eclips git中的add to Index无效解决
今天在使用eclips git中的add to Index,发现其无效,具体如下 问题描述: 通过export导入一个git java项目 在java工程中新增一个类文件IndicatorCalcTe ...
- sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) Cannot add a NOT NULL column with default value NULL [SQL: u'ALTER TABLE address_scopes ADD COLUMN ip_version INTEGER NOT NULL']
root@hett-virtual-machine:~# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neu ...
- list.add(int index, E element)和list.addAll(list1)
List.add(int index, E element): 在列表的指定位置插入指定元素(可选操作).将当前处于该位置的元素(如果有的话)和所有后续元素向右移动(在其索引中加 1). 参数:ind ...
- com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be null
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'goodsName' cannot be n ...
- select 下拉菜单Option对象使用add(elements,index)方法动态添加
原生js 的add函数为下拉菜单增加选项 1.object.add(oElement [, iIndex]) index 可选参数:指定元素放置所在的索引号,整形值.如果没有指定值,将添加到集合的最后 ...
- 关于 NPOI 报 Invalid column index (256). Allowable column range for BIFF8 is (0..255) or ('A'..'IV') 错误的解决办法
当看到这个错误的时候,网上搜索可以会有些说列数有限制之类的说法,这个说法是相对于 Office 2003 的,在 Office 2007 之前,最多只可以创建 列:在 Office 2007 之后, ...
- [转]jQuery: get table column/row index remove table column (by column number)
本文转自:http://www.xinotes.org/notes/note/1087/ <!DOCTYPE html><html><head> <title ...
随机推荐
- ACE_Task::putq(转)
int ACE_Task< ACE_SYNCH_DECL >::putq ( ACE_Message_Block * , ACE_Time_Value * timeout ...
- .bat批处理基础
批处理(Batch),也称为批处理脚本.顾名思义,批处理就是对某对象进行批量的处理,通常被认为是一种简化的脚本语言,它应用于DOS和Windows系统中.批处理文件的扩展名为bat .目前比较常见的批 ...
- asp.net+mvc+easyui+sqlite 简单用户系统学习之旅(六)—— 简单过滤器的使用
有些同学喜欢在测试或运行项目时,直接跳转页面到Home/Index下,但本次项目直接输入Home/Index则会报错 因为home/index中有个user.name参数,如果启动项目后直接跳转到ho ...
- xml文件的增删改读
最近学习了利用XmlDocument对象对xml进行增删改读操作,就写了一个小的例子记录下来,加深印象,以后忘了也可以找出来看看. xml文件: <?xml version="1.0& ...
- JanusGraph与Cassandra集成模式
//如果使用的是cassandra 2.2或更高版本,需要开启thift,以使janus连接到cassandra. ./bin/nodetool enablethrift. 15.1 Local Se ...
- javascript跨浏览器事件对象类库
一.前言 学习了javascript事件后,个人总结归纳了跨浏览器事件对象类库,方便以后使用,现分享给大家. 二.事件对象封装 将对浏览器事件对象的操作封装成eventObject.js方便调用 // ...
- Linux管理员必须知道的sudo命令
"Sudo"是Unix/Linux平台上的一个很实用的工具,它同意系统管理员分配给普通用户一些合理的"权利",让他们执行一些仅仅有超级用户或其它 特许用户才干完 ...
- 【转载】Js获取当前日期时间及其它操作
var myDate = new Date();myDate.getYear(); //获取当前年份(2位)myDate.getFullYear(); //获取完整的年份(4位,1 ...
- C++学习笔记34 模版的原理
模版在C++中具有很重要的地位.STL就是大量运用模版写出来的. 模版的长处我就不一一列举了.这里我仅仅说一下模版的原理. 当编译器遇到模版方法定义的时候,编译器进行语法检查,可是并不会编译模版.编译 ...
- apache POI 操作excel<导入导出>
1.首先导入maven依赖 <!-- POI核心依赖 --> <dependency> <groupId>org.apache.poi</groupId> ...