LOWER¶
The LOWER function in SQL returns a string in which all alphabetic characters in a specified string are converted to lowercase.
Syntax¶
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¶
Consider a table Item created and filled with the following data:
You can use the LOWER function to convert all name values to lowercase:
This will return:
Note that the LOWER function affects only alphabetic characters. Non-alphabetic characters in the string remain unchanged.