Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » String FunctionsRSS Feeds

LOWER Function

Posted By: Sarita Patel     Category: SQL Server     Views: 2512

This article explains LOWER function of sql server with examples.

LOWER function is used to convert upper case string to lower case string.


Syntax of LOWER Function :

LOWER ( character_expression  )

character_expression is an expression of character or binary data. character_expression can be a constant, variable, or column.  

Return type of LOWER function is varchar.


Examples of LOWER Function :

Example 1 : Use of LOWER function in select clause

SELECT LOWER('SynTax-Example')  

Output
syntax-example

Above example returns specified string in lower case.


Example 2 : Use of LOWER function to display field value of table.

SELECT LOWER(ContactName) AS 'Customer Name'    
FROM   Customers

Output
Customer Name
maria anders
ana trujillo
antonio moreno
thomas hardy
christina berglund
hanna moos

Above example displays customer name in lower case of customer table.



Example 3 : Use of LOWER function in where clause

SELECT ContactName, CompanyName
FROM   Customers
WHERE  LOWER(ContactName) LIKE 'thomas %'

Output
ContactName      CompanyName
Thomas Hardy    Around the Horn

Above example displays customers having name as 'thomas'.
 
  
Share: 

 
 
 

Didn't find what you were looking for? Find more on LOWER Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of LOWER Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!