SQL Server LOWER() Function

The LOWER() function in SQL Server converts a string to lowercase. This is a very common string manipulation function, useful for data cleaning, standardization, or case-insensitive comparisons.



LOWER(): Definition and Usage

LOWER() is a simple yet powerful tool for standardizing text data. It changes all uppercase letters in a string to their lowercase equivalents, leaving other characters (numbers, symbols, etc.) unchanged. This is often used to create consistent text formats for reporting or to perform case-insensitive searches where the capitalization of letters shouldn't matter for the search results.

Syntax

Syntax

LOWER(text)
      

Parameter Values

Parameter Description
text The string you want to convert to lowercase. This is required.

Related Function

For converting strings to uppercase, use the UPPER() function.

Examples

Converting a Literal String

This example converts the sample string "SQL Tutorial is FUN!" to lowercase.

Syntax

SELECT LOWER('SQL Tutorial is FUN!');
      
Output

sql tutorial is fun!
      

Converting Values in a Column

This example converts the values in the 'CustomerName' column of the 'Customers' table to lowercase and displays the results in a new column called 'LowercaseCustomerName'. (Assumes a 'Customers' table exists with a 'CustomerName' column.)

Syntax

SELECT LOWER(CustomerName) AS LowercaseCustomerName
FROM Customers;
      
Output

LowercaseCustomerName
-----------------------
(The lowercase versions of all customer names from the Customers table will be displayed here.)
      

**Note:** The second example's output will vary depending on the data in your `Customers` table. Each row will show the lowercase version of the `CustomerName` for that row.