Home >> FAQs/Tutorials >> MySQL Tutorials

MySQL Tutorial - Character String Data Types

By: FYIcenter.com

(Continued from previous topic...)

What Are Character String Data Types?

MySQL supports the following string data types:

  • CHAR(n) same as CHARACTER(n) - Fixed width and " " padded characters strings. Default character set is ASCII.
  • NCHAR(n) same as NATIONAL CHARACTER(n) - Fixed width and " " padded character strings with UTF8 character set.
  • VARCHAR(n) same as CHARACTER VARYING(n) - Variable width character strings. Default character set is ASCII.
  • NVARCHAR(n) same as NATIONAL CHARACTER VARYING(n) - Variable width character strings with UTF8 character set.
  • BINARY(n) - Fixed width and 0x00 padded byte strings.
  • VARBINARY(n) same as BINARY VARYING(n) - Variable width byte string.
  • TINYBLOB - BLOB (Binary Large Object) upto 255 bytes.
  • BLOB - BLOB (Binary Large Object) upto 64K bytes.
  • MEDIUMBLOB - BLOB (Binary Large Object) upto 16M bytes.
  • LONGBLOB - BLOB (Binary Large Object) upto 4G bytes.
  • TINYTEXT - CLOB (Binary Large Object) upto 255 characters.
  • TEXT - CLOB (Binary Large Object) upto 64K characters.
  • MEDIUMTEXT - CLOB (Binary Large Object) upto 16M characters.
  • LONGTEXT - CLOB (Binary Large Object) upto 4G characters.
  • ENUM - An enumeration to hold one entry of some pre-defined strings.
  • SET - A set to hold zero or more entries of some pre-defined strings.

(Continued on next topic...)

  1. What Is SQL Standard?
  2. How Many Groups of Data Types?
  3. What Are Character String Data Types?
  4. What Are the Differences between CHAR and NCHAR?
  5. What Are the Differences between CHAR and VARCHAR?
  6. What Are the Differences between BINARY and VARBINARY?
  7. What Are Numeric Data Types?
  8. What Are Date and Time Data Types?
  9. How To Calculate Expressions with SELECT Statements?
  10. How To Include Comments in SQL Statements?
  11. How To Include Character Strings in SQL statements?
  12. How To Escape Special Characters in SQL statements?
  13. How To Concatenate Two Character Strings?
  14. How To Include Numeric Values in SQL statements?
  15. How To Enter Characters as HEX Numbers?
  16. How To Enter Numeric Values as HEX Numbers?
  17. How To Enter Binary Numbers in SQL Statements?
  18. How To Enter Boolean Values in SQL Statements?
  19. What Are NULL Values?
  20. What Happens If NULL Values Are Involved in Expressions?
  21. How To Convert Numeric Values to Character Strings?
  22. How To Convert Character Strings to Numeric Values?
  23. How To Use IN Conditions?
  24. How To Use LIKE Conditions?
  25. How To Use Regular Expression in Pattern Match Conditions?
  26. How To Use CASE Expression?

MySQL Tutorials:

More...


Other Tutorials/FAQs:

More...


Related Resources:

More...


Selected Jobs:

More...