Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CHAR(n) A fixed length string of size n, where n =< 255 characters (can contain letters, numbers, and special characters).
- VARCHAR(n) A variable length string of max size n, where n =< 255 (can contain letters, numbers, and special characters). Note: If n > 255 it will be converted to a TEXT type
- TINYTEXT A string with a maximum length of 255 characters
- TEXT A string with a maximum length of 65,535 characters
- BLOB A large quantity, up to 65,535 bytes , of data eg a bit map photo
- MEDIUMTEXT A string with a maximum length of 16,777,215 characters
- MEDIUMBLOB A large quantity, up to 16,777,215 bytes, of data
- LONGTEXT A string with a maximum length of 4,294,967,295 characters
- LONGBLOB A large quantity, up to 4,294,967,295 bytes, of data
- ENUM(x,y,z, ...) A list of up to 65535 possible values (sorted in the order you enter them). If a value is inserted that is not in the list a blank value will be inserted.
- SET Like ENUM except that SET may contain up to 64 list items and can store more than one choice
- TINYINT(n) -128 to 127 signed integer or 0 to 255 unsigned integer with a max of n digits.
- SMALLINT(n) -32768 to 32767 signed. 0 to 65535 unsigned integer with a max of n digits.
- MEDIUMINT(n) -8388608 to 8388607 signed. 0 to 16777215 unsigned integer with a max of n digits.
- INT(n) -2147483648 to 2147483647 signed. 0 to 4294967295 unsigned integer with a max of n digits.
- BIGINT(n) -9223372036854775808 to 9223372036854775807 signed. 0 to 18446744073709551615 unsigned integer with a max of n digits.
- FLOAT(n,d) A small floating decimal point number with max digits n and max of d digits to the right of the decimal point.
- DOUBLE(n,d) A large floating decimal point number with max digits n and max of d digits to the right of the decimal point.
- DECIMAL(n,d) A DOUBLE but stored as a string. This allows a fixed decimal point with a max of d digits to the right of the decimal point.
- TINYINT(1) can be used to store boolean vaues of TRUE and FALSE . ( Zero is considered FALSE. Non-zero is considered TRUE.
- Since MySQL 5.0.3 there is also
- BIT(1) - or even up to BIT(64) to store 64 boolean values
- BOOL and BOOLEAN which are equivalent to TINYINT(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement