18.2 database data types

 

 

Database data types

 

Numeric Types  Spec  Description
 TINYINT Integer(-128 ~ 127) A very small integer
 SMALLINT Integer(-32768 ~ 32767) A small integer
 MEDIUMINT Integer(-8388608 ~ 8388607) A medium-sized integer
 INT Integer(-2147483648 ~ 2147483647) A standard integer
 BIGINT Integer(-923372036854775808 ~ 923372036854775807) A large integer
 DECIMAL   A fixed-point number
 FLOAT Decimal(23자리) A single-precision floating point number
 DOUBLE Decimal(24 ~ 53자리) A double-precision floating point number
 BIT   A bit field

 

String Types Spec  Description
 CHAR String(0 ~ 255) A fixed-length nonbinary (character) string
 VARCHAR String(0 ~ 255) A variable-length non-binary string
 BINARY   A fixed-length binary string
 VARBINARY   A variable-length binary string
 TINYBLOB   A very small BLOB (binary large object)
 BLOB String(0 ~ 65535) A small BLOB
 MEDIUMBLOB String(0 ~ 16777215) A medium-sized BLOB
 LONGBLOB String(0 ~ 424967295) A large BLOB
 TINYTEXT String(0 ~ 255) A very small non-binary string
 TEXT String(0 ~ 65535) A small non-binary string
 MEDIUMTEXT String(0 ~ 16777215) A medium-sized non-binary string
 LONGTEXT String(0 ~ 424967295) A large non-binary string
 ENUM 설정 옵션중 하나 An enumeration; each column value may be assigned one enumeration member
 SET 설정 옵션중 선택 A set; each column value may be assigned zero or more SET members

 

Date and Time Types Spec  Description
 DATE CCYY-MM-DD A date value in CCYY-MM-DD format
 TIME CCYY-MM-DD hh:mm:ss A time value in hh:mm:ss format
 DATETIME CCYYMMDDhhmmss A date and time value inCCYY-MM-DD hh:mm:ssformat
 TIMESTAMP hh:mm:ss A timestamp value in CCYY-MM-DD hh:mm:ss format
 YEAR CCYY, YY A year value in CCYY or YY format

 

Spatial Data Types Spec  Description
 GEOMETRY   A spatial value of any type
 POINT   A point (a pair of X-Y coordinates)
 LINESTRING   A curve (one or more POINT values)
 POLYGON   A polygon
 GEOMETRYCOLLECTION   A collection of GEOMETRYvalues
 MULTILINESTRING   A collection of LINESTRINGvalues
 MULTIPOINT   A collection of POINTvalues
 MULTIPOLYGON   A collection of POLYGONvalues

 

출처 : http://www.mysqltutorial.org/mysql-data-types.aspx

'파이썬 기초' 카테고리의 다른 글

18-1 Sqlite3  (0) 2020.05.16
18. Database  (0) 2020.05.16
17. 쓰레드 (Thread)  (1) 2020.05.16
16. 예외 처리  (0) 2020.05.16
15. 모듈(module)과 패키지(package), import  (0) 2020.05.16
14. 클래스(class)  (0) 2020.05.16
13. 파일 읽고 쓰기  (0) 2020.05.16
12. 함수 (function) 만들기  (0) 2020.05.16

+ Recent posts