sundry

General grammar 2

constant

  • INT_ VALUE : matches an integer type constant, such as one hundred and twenty-three
  • DECIMAL_ VALUE : matches fixed-point type constants, such as one hundred and twenty-three point four five six
  • STR_ VALUE : matches string constants, such as abc
  • NULL : matches a null constant.
  • STORAGE_ SIZE : matches the storage length constant. The default unit of integer is byte. The unit of string can be specified as m or G, such as one thousand and twenty-four or '500M'
 const_ value:
      INT_ VALUE
    | DECIMAL_ VALUE
    | STR_ VALUE
    | NULL
    | STORAGE_ SIZE

STORAGE_ SIZE:
      INT_ VALUE
    | 'INT_ VALUE[M|G]'

character set

 charset:
      default_ charset
    | column_ charset

default_ charset:
    [DEFAULT] {CHARSET | CHARACTER SET} [=] {UTF8 | UTF8MB4 | BINARY}

column_ charset:
    {CHARSET | CHARACTER SET} {UTF8 | UTF8MB4 | BINARY}

Collation

 collate:
      default_ collate
    | column_ collate

default_ collate:
    [DEFAULT] COLLATE [=] {UTF8MB4_ GENERAL_ CI | UTF8MB4_ BIN | BINARY}

column_ collate:
    COLLATE {UTF8MB4_ GENERAL_ CI | UTF8MB4_ BIN | BINARY}

data type

 data_ type:
      TINYINT[(precision)] [UNSIGNED] [ZEROFILL] 
    | SMALLINT[(precision)] [UNSIGNED] [ZEROFILL] 
    | MEDIUMINT[(precision)] [UNSIGNED] [ZEROFILL] 
    | INT[(precision)] [UNSIGNED] [ZEROFILL] 
    | INTEGER[(precision)] [UNSIGNED] [ZEROFILL] 
    | BIGINT[(precision)] [UNSIGNED] [ZEROFILL] 
    | FLOAT[(precision,  scale)] [UNSIGNED] [ZEROFILL] 
    | DOUBLE[(precision, scale)] [UNSIGNED] [ZEROFILL] 
    | DECIMAL[(precision [, scale])] [UNSIGNED] [ZEROFILL] 
    | NUMERIC[(precision [, scale])] [UNSIGNED] [ZEROFILL] 
    | DATETIME[(scale)] 
    | TIMESTAMP[(scale)] 
    | DATE
    | TIME[(scale)] 
    | YEAR
    | VARCHAR(length) column_ charset column_ collate
    | VARBINARY(length)
    | CHAR[(length)] column_ charset column_ collate
    | BINARY[(length)]
    | TINYTEXT column_ charset column_ collate
    | TINYLOB
    | TEXT[(length)] column_ charset column_ collate
    | BLOB[(length)]
    | MEDIUMTEXT column_ charset column_ collate
    | MEDIUMBLOB
    | LONGTEXT column_ charset column_ collate
    | LONGBLOB

precision | scale | length:
    INT_ VALUE

SQL properties

  • Object name
 tenant_ name | pool_ name | unit_ name | zone_ name | region_ name:
    STR_ VALUE

database_ name | table_ name | table_ alias_ name | column_ name| column_ alias_ name  | partition_ name | subpartition_ name:
    STR_ VALUE

index_ name | view_ name | object_ name | constraint_ name | tablegroup_ name:
    STR_ VALUE

outline_ name | user_ name:
    STR_ VALUE

table_ factor:
    [[database_ name].] table_ name

column_ factor:
    [table_ factor.] column_ name
  • expression
 expression:
      const_ value
    | column_ factor
    | operator_ expression
    | function_ expression
  • notes
 comment : COMMENT  'comment_ text' comment_ text:
    STR_ VALUE

Distributed properties

  • PRIMARY_ ZONE : Specifies the primary replica distribution policy for the data.
 primary_ zone:
    PRIMARY_ ZONE [=] zone_ name
  • ZONE_ LIST : Specifies the resource distribution policy for the tenant.
 zone_ list:
    ZONE_ LIST [=] (zone_ name [, zone_ name ...])
  • REPLICA_ NUM : Specifies the number of copies of the data.
 replica_ num:
    REPLICA_ NUM [=] INT_ VALUE
  • TABLEGROUP : Specifies the primary replica distribution policy for multiple copies of data.
 tablegroup:
      default_ tablegroup
    | table_ tablegroup

default_ tablegroup:
    DEFAULT TABLEGROUP [=] {tablegroup_ name | NULL}

table_ tablegroup:
    TABLEGROUP [=] {tablegroup_ name | NULL}

Storage properties

  • BLOCK_ SIZE : Specifies the chunk length of the object store.
 block_ size:
    BLOCK_ SIZE [=] INT_ VALUE
  • COMPRESSION : Specifies the compression algorithm for the object store.
 compression:
    COMPRESSION [=] {NONE | LZ4_ 1.0 | LZ0_ 1.0 | SNAPPY_ 1.0 | ZLIB_ 1.0}
  • PCTFREE : Specifies the percentage of macro block reserve for object storage.
 pctfree:
    PCTFREE [=] INT_ VALUE
  • TABLET_ SIZE : Specifies the minimum fragmentation of a single task in parallel merge.
 tablet_ size:
    TABLET_ SIZE [=] INT_ VALUE
fabulous ( eight hundred and one )

This paper is written by Ji Changxin Creation, article address: https://blog.isoyu.com/archives/tongyongyufahuizongxia.html
use 4 Signature knowledge sharing International license agreement. Except for the reprint / source, they are all original or translated by our website. Please sign before reprinting. Last editing time: April 7, 2019 at 07:55 PM

key word:

Hot comments on articles

Comments:

4 comments, 3 visitors, 1 Blogger
    •  Ji Changxin
      Ji Changxin Published on:

      My own notes. Good morning

Comment

[required]

invisibility?

Please wait three seconds after submitting to avoid unsuccessful submission and repetition