DATA TYPES Flashcards
(32 cards)
A FIXED length string (can contain letters, numbers, and special characters). The size parameter specifies the column length in characters can be from 0 to 255. Default is 1
CHAR(size)
A VARIABLE length string (can contain letters, numbers, and special characters). The size parameter specifies the maximum column length in characters - can be from 0 to 65535
VARCHAR(size)
Equal to CHAR(), but stores _byte strings. The size parameter specifies the column length in bytes. Default is 1
BINARY(size)
Equal to VARCHAR(), but stores binary byte strings. The size parameter specifies the maximum column length in bytes.
VARBINARY(size)
For BLOBS (Binary Large Objects). Max length: 255 bytes
TINYBLOB
Holds a string with a maximum length of 255 characters
TINYTEXT
Holds a string with a maximum length of 65,535 bytes
TEXT(size)
For _(Binary Large OBiects). Holds up to 65,535 bytes of data
BLOB(size)
Holds a string with a maximum length of 16,777,215 characters
MEDIUMTEXT
For BLOBs (Binary Large Objects). Holds up to 16,777,215 bytes of data
MEDIUMBLOB
Holds a string with a maximum length of 4,294,967,295 characters
LONGTEXT
For BLOBS (Binary Large Objects). Holds up to 4,294,967,295 bytes of data
LONGBLOB
A string object that can have only one value, chosen from a list of possible values. You can list up to 65535 values in an ENUM list. If a value is inserted that is not in the list, a blank value will be inserted. The values are sorted in the order you enter them
ENUM(val1, val2, val3, …)
A string object that can have 0 or more values, chosen from a list of possible values. You can list up to 64 values in a SET list
SET(val1, val2, val3, …)
A bil-value type The number of bits per value is specified in size The size parameter can hold a value from 1 to 64. The default value for size is 1
BIT(size)
(A very small intiger Signed range is from-128 to 127. Unsigned range is from 0 to 255. The size parameter specifies the maximun display wilth (which is 255)
TINYINT
Zero is considered as false, nonzero values are considered as true
BOOL
Equal to BOOL
BOOLEAN
A small integer. Signed range is from -32768 to 32/67 Unsignod range is from 0 to 65535. The size parameter specitius the mammum display wedth (which is 265)
SMALLINT(size)
A medium intiger Signed range is from 8388808 to 8388607. Unsigned range is from 0 to 16777215. The size parameter specifies the maamum display with (which is 2551
MEDIUMINT(Size)
A szemedium integer Signed range is from -2147483648 to 2147483647. Unsigned range is from 0 to 4294967296, the size panemeter speciños the moumum display redtty (which in 255)
INT(size)
Equal to INT (size)
INTEGER(size)
A large integer Signed range is from -9223372036854775808 to 9223372036854775807. Unsigned range is from 0 to 184467440/3700651615. The sto parameter specifies the maximum display width (which is 255)
BIGINT(size)
A floating point number. The total number of digits is specified in size. The number of digits after the decimal point is specified in the parameter. This synlax is deprecated in MySQL 8.0.17 and it will be removed in future MySQL versions
FLOAT (size,d)