MS SQL Server LOWER() Function

Sometimes you may need to convert uppercase character data to lowercase in MS SQL Server. There is a function called LOWER in MS SQL Server by which you can do this. LOWER function returns a character expression after converting lowercase character data to uppercase.

Let’s see the function syntax:

UPPER(character_expression);

In this syntax:

  • In this function there is one parameters character_expression.
  • Parameter character_expression is an expression of character or binary data.
  • Parameter character_expression can be a constant, variable, or column.
  • Returns data type of varchar or nvarchar data.
  • Function returns a character expression after converting uppercase character data to lowercase.

The following example uses LOWER function to convert lowercase character data to uppercase.

DECLARE @input varchar(60);
SET @input = 'Minhajur Rahman Khan';
SELECT @input AS 'original_string', UPPER(@input) AS 'lower_case_string';

Here is the result set.

original_string upper_case_string
Minhajur Rahman Khan minhajur rahman khan

I have an another post MS SQL Server String Related Functions where you will learn about different string related functions of MS SQL Server.

In this tutorial, I have shown you how to convert uppercase character data to lowercase in MS SQL Server. Hope you have enjoyed the tutorial. If you want to get updated, like my facebook page http://www.facebook.com/freetechtrainer and stay connected.

Add a Comment