information_schema系统表——COLUMNS
2017-11-15 15:30
736 查看
该系统表包含了所有表的列信息
The
provides information about columns in tables.
Notes:
In
the
several different
you might want to say
Unlike
not have automatic ordering.
same as
for multibyte character sets.
For example, if you say
a value of
set is what is before the first underscore:
generated columns and displays the expression used to compute column values. For information about generated columns, see Section 13.1.18.8,
“CREATE TABLE and Generated Columns”.
The
generated columns.
The
COLUMNStable
provides information about columns in tables.
INFORMATION_SCHEMAName | SHOWName | Remarks |
---|---|---|
TABLE_CATALOG | def | |
TABLE_SCHEMA | ||
TABLE_NAME | ||
COLUMN_NAME | Field | |
ORDINAL_POSITION | see notes | |
COLUMN_DEFAULT | Default | |
IS_NULLABLE | Null | |
DATA_TYPE | Type | |
CHARACTER_MAXIMUM_LENGTH | Type | |
CHARACTER_OCTET_LENGTH | ||
NUMERIC_PRECISION | Type | |
NUMERIC_SCALE | Type | |
DATETIME_PRECISION | Type | |
CHARACTER_SET_NAME | ||
COLLATION_NAME | Collation | |
COLUMN_TYPE | Type | MySQL extension |
COLUMN_KEY | Key | MySQL extension |
EXTRA | Extra | MySQL extension |
PRIVILEGES | Privileges | MySQL extension |
COLUMN_COMMENT | Comment | MySQL extension |
GENERATION_EXPRESSION | MySQL extension |
In
SHOW,
the
Typedisplay includes values from
several different
COLUMNScolumns.
ORDINAL_POSITIONis necessary because
you might want to say
ORDER BY ORDINAL_POSITION.
Unlike
SHOW,
SELECTdoes
not have automatic ordering.
CHARACTER_OCTET_LENGTHshould be the
same as
CHARACTER_MAXIMUM_LENGTH, except
for multibyte character sets.
CHARACTER_SET_NAMEcan be derived from
Collation.
For example, if you say
SHOW FULL COLUMNS FROM t, and you see in the
Collationcolumn
a value of
latin1_swedish_ci, the character
set is what is before the first underscore:
latin1.
GENERATION_EXPRESSIONis nonempty for
generated columns and displays the expression used to compute column values. For information about generated columns, see Section 13.1.18.8,
“CREATE TABLE and Generated Columns”.
The
EXTRAcolumn contains
VIRTUAL GENERATEDor
VIRTUAL STOREDfor
generated columns.
相关文章推荐
- information_schema系统表——EVENTS
- information_schema系统表——TABLE_PRIVILEGES
- SQL Server:INFORMATION_SCHEMA.columns vs sys.columns vs syscolumns
- INFORMATION_SCHEMA.COLUMNS-表的字段信息
- information_schema.columns 学习
- mysql系统库INFORMATION_SCHEMA,MySQL,TEST,mysql系统表的作用
- information_schema系统表——COLLATION_CHARACTER_SET_APPLICABILITY
- SELECT * FROM information_schema.columns
- information_schema系统表——TRIGGERS
- MySQL-INFORMATION_SCHEMA COLUMNS表
- SQL 利用INFORMATION_SCHEMA系统视图如何一步一步获取表的主外键信息
- information_schema系统表——FILES
- information_schema系统表——USER_PRIVILEGES
- 探讨SQL利用INFORMATION_SCHEMA系统视图如何获取表的主外键信息
- 关于mysql中的information_schema.tables和information_schema.columns详解
- 二:MySQL中的 帮助 和 information_schema 数据库 - 系统的撸一遍MySQL
- MySQL系列之INFORMATION_SCHEMA.COLUMNS-表的字段信息
- mysql数据库系统数据库information_schema
- MySQL--INFORMATION_SCHEMA COLUMNS表
- INFORMATION_SCHEMA.COLUMNS 查询表字段语句