CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON [ ONLY ] table_name [ USING method ] ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ...
Create database [if not exists] database_name [charset charset_name];其中,if not exists表示如果...
执行CREATE INDEX语句创建索引需要当前用户至少拥有对应对象的 INDEX 权限。有关 OceanBase 数据库权限的详细介绍,请参见MySQL 模式下的权限分类。 语法 CREATE[hint_options][SPATIAL|UNIQUE]INDEX[IFNOTEXISTS]index_name[USINGBTREE]ONtable_name(sort_column_key[,sort_column_key...])[index_option...][partiti...
CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] name ] ON [ ONLY ] table_name [ USING method ] ( { column_name | ( expression ) } [ COLLATE collation ] [ opclass [ ( opclass_parameter = value [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ...
When you create a unique index, you can set an option to ignore duplicate keys. If this option is set to Yes and you attempt to create duplicate keys by adding data that affects multiple rows (with the INSERT statement), the row containing a duplicate is not added. If it is set to ...
create-index::='CREATE''INDEX'index-name ('IF''NOT''EXISTS')?'ON'keyspace-ref'('index-key lead-key-attribs? ( ( ',' index-key key-attribs? )+ )?')'index-partition? where-clause? index-using? index-with? index-name (Required) A unique name that identifies the index. ...
PRIMARY KEY 和 UNIQUE 约束隐式创建,还是使用 CREATE INDEX 显式创建)。每个索引均可 对于索引视图,只能为已经定义了聚集索引的视图创建非聚集索引。因此,索引视图中非 index_name 是索引名。索引名在表或视图中必须唯一,但在数据库中不必唯一。索引名必须遵循标识 ...
4The INtablespace-nameclause can be specified only for a nonpartitioned index on a partitioned table. 5The INCLUDE clause can be specified only if UNIQUE is specified. 6Ifxml-index-specificationis specified,column-nameDESC, INCLUDE, or CLUSTER cannot be specified. ...
If a unique index over XML data exists on a table, the table cannot be altered to add a distribution key. INDEXindex-name Names the index or index specification. The name, including the implicit or explicit qualifier, must not identify an index or index specification that is described in th...
CREATE [ UNIQUE ] [ index-type ] INDEX [ IF NOT EXISTS ] <index-name> …ON [ <owner>.] … ( <column-name> [ , <column-name> ] …) …[ { IN | ON } <dbspace-name> ] …[ NOTIFY <integer> ] …[ DELIMITED BY '<separators-string>‘ ] …[ LIMIT <maxwordsize-integer...