SQL Server Documentation

LOWER (Transact-SQL)

Converts a character string to lowercase.

Syntax

LOWER ( character_expression )

Arguments

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.
  • char
  • varchar
  • text
  • nchar
  • nvarchar
  • ntext
  • varchar(max)
  • nvarchar(max)
  • ntext
  • Implicit conversion to varchar or nvarchar.

Return Value

Returns the same data type as character_expression with all uppercase characters converted to lowercase. If the input is NULL, NULL is returned.

Examples

Example 1: Converting a string to lowercase

The following example returns the string 'adventureworks' in lowercase.

SELECT LOWER('AdventureWorks');
                

Result:

adventureworks
                

Example 2: Using LOWER with a column

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
                
Tip: For case-insensitive comparisons, consider using UPPER or LOWER for both operands in the comparison, or ensure that the collation of the columns used in the comparison is case-insensitive.

See Also