Our first examples of functions will examine many of the single-row functions that are capable of transforming string, or character, data. Of course, string data is one of the most common types of data stored in a database, so our ability to transform such data through the use of functions is critical. The types of string functions at our disposal include case conversion functions and string manipulation functions.
Case conversion functions involve the transformation of strings from one case to another. These types of functions are extremely common, particularly in reporting. They include:
UPPER()
LOWER()
INITCAP()
Our first case conversion function is UPPER()
, which is used to convert a string into uppercase values. The original case of the string value is irrelevant; UPPER()
will convert lower or mixed case values into uppercase. If the original string value is in uppercase, the resulting value will be unchanged, but...