lower Function
The lower function converts all the characters in a string to lowercase.
Syntax
returnvalue lower (source)
source ::= any*
returnvalue ::= string
Semantics
- source
-
The input string that should be converted to lowercase. This argument is implicitly cast to a sequence of strings.
- returnvalue
-
Returns NULL if the source argument is NULL.
Returns NULL if the source argument is an empty sequence or a sequence with more than one item.
Note:
If you want to convert a sequence with more than one item, see the Sequence Transform Expressions section.Example 12-8 lower Function
In this example, the lastname field is converted to lowercase.
SELECT id, firstname, lower(lastname) FROM users
Output: +----+-----------+----------+
| id | firstname | Column_3 |
+----+-----------+----------+
| 10 | John | smith |
| 20 | Mary | ann |
| 30 | Peter | paul |
+----+-----------+----------+