String
A value stored as a sequence of characters, which is to say text. The characters 2025 held as a string are four symbols, not a number.
Strings are compared character by character, so Smith, smith, and Smith followed by a space are three different values. They also sort as text, which puts 10 before 9.
Where it comes up
- Numbers stored as textA column of quantities contains symbols, separators, or words that stop software reading it as numbers.
- Inconsistent capitalizationThe same value appears in capitals, in lowercase, and in mixed case, and software treats each as different.
- Stray whitespace and invisible charactersTwo values look identical on screen but differ by a trailing space, a non-breaking space, or a hidden character.
See also
- Data typeThe kind of value a column holds, such as text, whole number, decimal, date, or true and false. The type decides what operations make sense.
- Empty stringA text value with no characters in it. It is a value that exists and happens to be empty, which is different from null, where no value exists at all.
- WhitespaceCharacters that take up space without showing a mark: spaces, tabs, line breaks, and less obvious ones such as the non-breaking space.