LOWER
LOWER is a SQL function that converts all letters in a specified string to lowercase.
LOWER(str)
- str: The input string for which all uppercase characters need to be converted into their lowercase equivalents.
Example
Output
Explanation
The LOWER()
function in SQL is used to convert all letters in a text string to lowercase. In the provided example, the input string ‘HELLO WORLD’ was converted to ‘hello world’.
LOWER(string text) RETURNS text
- string text: This is a mandatory parameter. It is the text that needs to be converted to lower case. The string text can be a literal string, data from table columns or a derived character string. This function will return a version of the supplied string text where all uppercase characters have been changed to lowercase.
Example
Output
Explanation
The LOWER function in PostgreSQL converts all letters in a text string to lower case. Used above, ‘Hello World!’ becomes ‘hello world!’.
LOWER( string_expression )
- string_expression: This is the string that needs to be converted to lowercase. It is expressed as a variable, column, or string literal.
Example
Output
Explanation
In the given example, the LOWER
function is used to convert all the text of the string ‘SELECT LOWER FUNCTION IN SQL’ to lowercase. The result is ‘select lower function in sql’.
LOWER(string)
- string: This parameter represents the string value to be converted to lowercase. All alphabetical characters in the specified string are converted to lowercase and non-alphabetical characters remain unchanged.
Example
Output
Explanation
In Oracle SQL, the LOWER
function converts all letters in the specified string to lowercase. In the example, ‘Hello World!’ is converted to ‘hello world!’.
LOWER(X)
- x: This parameter represents the string that will be transformed into lowercase. It can be a string of text, or a column containing text within a database. The LOWER(X) function will convert all uppercase characters in the string to their lowercase equivalents.
Example
Output
Explanation
The LOWER()
function in SQLite is used to convert all letters in a text string to lower case. In the given example, the function converts ‘HELLO WORLD’ to ‘hello world’.