Case manipulation functions are part of the character functions. It converts the data from the state in which it is already stored in the table to upper, lower, or mixed case. The conversion performed by this function can be used to format the output. We can use it in almost every part of the SQL statement. Case manipulation functions are mostly used when you need to search for data, and you don't have any idea that the data you are looking for is in lower case or upper case.
There are three case manipulation functions in SQL:
LOWER: This function is used to converts a given character into lowercase. The following example will return the 'STEPHEN' as 'stephen':
UPPER: This function is used to converts a given character into uppercase. The following example will return the 'stephen' as 'STEPHEN':
INITCAP: This function is used to converts given character values to uppercase for the initials of each word. It means every first letter of the word is converted into uppercase, and the rest is in lower case. The following example will return the 'hello stephen' as 'Hello Stephen':
Answers (0)