2016년 11월 24일 목요일

MySQL Length and Maximum Size by Data Type

TINYINT[n] [UNSIGNED] [ZEROFILL]
: -128 ~ 127 (UNSIGNED then 0 ~ 255)

SMALLINT[n] [UNSIGNED] [ZEROFILL]
: -32768 ~ 32767 (UNSIGNED then 0 ~ 65535)

MEDIUMINT[n] [UNSIGNED] [ZEROFILL]
: -8388608 ~ 8388607 (UNSIGNED then 0 ~ 16777215)

INT[n] [UNSIGNED] [ZEROFILL]
: -2147483648 ~ 2147483647 (UNSIGNED then 0 ~ 4294967295)
: All operations are done with "signed BIGINT". so, if you are outside the range of "signed BIGINT", such as addition multiplication, the value will be wrong.

INTEGER[n] [UNSIGNED] [ZEROFILL]
: -2147483648 ~ 2147483647 (UNSIGNED then 0 ~ 4294967295)

BIGINT[n] [UNSIGNED] [ZEROFILL]
: -9223372036854775808 ~ 9223372036854775807 (UNSIGNED then 0 ~ 18446744073709551615)

FLOAT[n,d] [ZEROFILL]
: -3.402823466E+38 ~ -1.175494351E-38, 0 and
: 1.175494351E-38 ~ 3.402823466E+38
: You can not set unsigned.

DOUBLE[n,d] [ZEROFILL]
: -1.7976931348623157E+308 ~ -2.2250738585072014E-308, 0 and
: 2.2250738585072014E-308 ~ 1.7976931348623157E+308
: You can not set unsigned.

REAL[n,d] [ZEROFILL]
: -1.7976931348623157E+308 ~ -2.2250738585072014E-308, 0 and
: 2.2250738585072014E-308 ~ 1.7976931348623157E+308

DATE
: ‘1000-01-01’ ~ ‘9999-12-31’
: You can not set unsigned.

DATETIME
: ‘1000-01-01 00:00:00’ ~ ‘9999-12-31 23:59:59’

TIMESTAMP[n]
: ‘1970-01-01 00:00:00’ ~ 2037

CHAR(n) [BINARY]
: 1 ~ 255 letters
: If a fixed length and a small length are entered, they are filled in with spaces on the right. If the BINARY keyword is not given, search is case insensitive.

VARCHAR(n) [BINARY]
: 1 ~ 255 letters
: If the BINARY keyword is not given, search is case insensitive.

TINYTEXT
: Max 255 byte

TEXT
: Max 65535 byte

MEDIUMTEXT
: Max 16777215 byte

LONGTEXT
: Max 4294967295 byte

ENUM(‘value1′, ’value2’, …)
: ‘value1’, ‘value2’, …, or NULL can be entered Only. Up to 65535 different values can be entered.

SET(‘value1′, ’value2’, …)
: ‘value1’, ‘value2’, …, or NULL can be entered Only. Up to 64 different values can be entered.

댓글 없음:

댓글 쓰기

플러터 단축키

1. 위젯 감싸기/벗기기 비주얼 스튜디오 :   Cmd + . 안드로이드 스튜디오 : Alt + Enter 2. 코드 정렬 비주얼 스튜디오 : Ctrl + S 안드로이드 스튜디오 : Ctlr + Alt + L 3. StatelessWidget ->...