LOWER
The LOWER function in SQL returns a string in which all alphabetic characters in a specified string are converted to lowercase.
Syntax
LOWER(string)
Parameters
string: The original string to convert.
Return Value
The function returns a new string that is the same as the original string, but with all uppercase characters converted to lowercase. Non-alphabetic characters in the string are unaffected.
Errors
- If the
stringargument is not a string, aFunctionRequiresStringValueerror will be returned.
Examples
You can use the LOWER function to convert all name values to lowercase:
SELECT LOWER(name) AS lower_name FROM Item;
This will return:
abcd
abcd
abcd
Note that the LOWER function affects only alphabetic characters. Non-alphabetic characters in the string remain unchanged.