Below are two Oracle Database functions that convert uppercase characters to their lowercase equivalent.
The LOWER()
Function
The LOWER()
function returns its argument with all letters in lowercase.
Example:
SELECT LOWER('This is a COVERT OPERATION')
FROM DUAL;
Result:
this is a covert operation
Any lowercase letters remain in lowercase, while uppercase characters are converted to their lowercase equivalent.
The NLS_LOWER()
Function
The NLS_LOWER()
function is similar to the LOWER()
function, except that it accepts a second argument that allows you to specify the collation. The collation handles special linguistic requirements for case conversions.
The second argument is optional, so we can use this function to do exactly the same as the previous example:
SELECT NLS_LOWER('This is a COVERT OPERATION')
FROM DUAL;
Result:
this is a covert operation
However, we can also call the function with a second argument to specify the collation.
Example:
SELECT
NLS_LOWER('BALIQ') AS r1,
NLS_LOWER('BALIQ', 'NLS_SORT = XAZERBAIJANI') AS r2
FROM DUAL;
Result:
R1 R2 ________ ________ baliq balıq
Notice that the second column uses a dotless lowercase i
character, which adheres to the Azerbaijani writing system.