String Data Types


String data types include a sequence of characters including numbers, letters, spaces, and symbols.

  • aka char, text, string
  • holds qualitative data (categorical)
    • great for grouping information

Alphanumeric is a string data type that consists of a combination of letters (alphabetic characters) and numbers (numeric characters).

  • most versatile

Types of String Data Types

  • CHAR
    • short for character
    • is a SQL-defined data type that stores a specified number of characters (fixed)
    • uses spaces as padding if the input is shorter
  • VARCHAR
    • stores variable length strings
    • can have a field that holds up to 15 characters
    • doesn’t pad the field with spaces
  • NVARCHAR
    • behaves like VARCHAR, but contains support for multilingual and Unicode characters
    • N stands for national