Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. CHAR(n) A fixed length string of size n, where n =< 255 characters (can contain letters, numbers, and special characters).
  2. 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
  3. TINYTEXT A string with a maximum length of 255 characters
  4. TEXT A string with a maximum length of 65,535 characters
  5. BLOB A large quantity, up to 65,535 bytes , of data eg a bit map photo
  6. MEDIUMTEXT A string with a maximum length of 16,777,215 characters
  7. MEDIUMBLOB A large quantity, up to 16,777,215 bytes, of data
  8. LONGTEXT A string with a maximum length of 4,294,967,295 characters
  9. LONGBLOB A large quantity, up to 4,294,967,295 bytes, of data
  10. 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.
  11. SET Like ENUM except that SET may contain up to 64 list items and can store more than one choice
  12.  
  13. TINYINT(n) -128 to 127 signed integer or 0 to 255 unsigned integer with a max of n digits.
  14. SMALLINT(n) -32768 to 32767 signed. 0 to 65535 unsigned integer with a max of n digits.
  15. MEDIUMINT(n) -8388608 to 8388607 signed. 0 to 16777215 unsigned integer with a max of n digits.
  16. INT(n) -2147483648 to 2147483647 signed. 0 to 4294967295 unsigned integer with a max of n digits.
  17. BIGINT(n) -9223372036854775808 to 9223372036854775807 signed. 0 to 18446744073709551615 unsigned integer with a max of n digits.
  18. 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.
  19. 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.
  20. 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.
  21.  
  22. TINYINT(1) can be used to store boolean vaues of TRUE and FALSE . ( Zero is considered FALSE. Non-zero is considered TRUE.
  23. Since MySQL 5.0.3 there is also
  24. BIT(1) - or even up to BIT(64) to store 64 boolean values
  25. BOOL and BOOLEAN which are equivalent to TINYINT(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement