Skip to content
Personal Github

SQL Data types

-3 minutes of reading.
  1. CHAR - STR, length 0 - 255

  2. VARCHAR - STR, variable length, max length specified

  3. TEXT - STR, variable length, max length 65,535 characters

  4. INT - INT, range - 2,147,483,648 to 2,147,483,647

  5. SMALLINT - INT, range - 32,768 to 32,767

  6. TINYINT - INT, range -128 to 127

  7. BIGINT - INT, range - 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

  8. FLOAT - FLOAT point number, approximate number

  9. DOUBLE - FLOAT point number, double precision

  10. DECIMAL - FIXED point number, exact value

  11. DATE - DATE, format YYYY-MM-DD

  12. TIME - TIME, format HH:MM:SS

  13. DATETIME - DATE and TIME, format YYYY-MM-DD HH:MM:SS

  14. TIMESTAMP - TIMESTAMP, format YYYY-MM-DD HH:MM:SS, range 1970-01-01 00:00:01 UTC to 2038-01-19 03:14:07 UTC

  15. YEAR - YEAR, format YYYY, range 1901 to 2155

  16. BLOB - BINARY LARGE OBJECT, variable length, max length 65,535 bytes

  17. BIT - BIT FIELD, length specified