Converts a character string to lowercase.
LOWER ( character_expression )
Parameter Name | Description | Supported Data Types |
---|---|---|
character_expression |
Is an expression of character data. character_expression can be a constant, a variable, or a column that returns a character data type. |
|
Returns the same data type as character_expression
with all uppercase characters converted to lowercase. If the input is NULL, NULL
is returned.
The following example returns the string 'adventureworks' in lowercase.
SELECT LOWER('AdventureWorks');
Result:
adventureworks
The following example converts all product names in the Production.Product
table to lowercase.
SELECT LOWER(Name)
FROM Production.Product
WHERE ProductID = 508;
If the Name
for ProductID
508 is 'Long-Sleeve Logo T-Shirt', the result will be:
long-sleeve logo t-shirt
UPPER
or LOWER
for both operands in the comparison, or ensure that the collation of the columns used in the comparison is case-insensitive.