The Oracle PL/SQL LOWER function is a built-in function that is used to convert all the alphabetic characters in a given string to lowercase. This function takes a string as input and returns the same string with all alphabetic characters converted to lowercase.
Syntax
The syntax for using the LOWER function in Oracle PL/SQL is as follows:
LOWER (string)
Where string is the input string that needs to be converted to lowercase.
Example
Here is an example of how the LOWER function can be used in a PL/SQL block:
DECLARE v_str VARCHAR2(50) := 'HELLO, WORLD!'; BEGIN dbms_output.put_line(LOWER(v_str)); -- Output: hello, world! END;
In this example, the LOWER function is used to convert the string HELLO, WORLD! to hello, world!. The dbms_output.put_line function is used to display the output on the screen.
It is important to note that the LOWER function only converts alphabetic characters to lowercase. Any non-alphabetic characters in the input string, such as numbers or special characters, will remain unchanged.
In conclusion, the Oracle PL/SQL LOWER function is a useful function for converting strings to lowercase, which can be beneficial for string comparisons and formatting purposes.