aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies


In this article I will explain how to write a query to convert or change lowercase to uppercase or uppercase to lowercase characters in SQL server.


In previous post I explained how to alter or modify or delete or change already existing column in datatable in SQL Server and many articles relating to SQL Server. Now I will explain how to convert or change lowercase to uppercase or lowercase to uppercase characters in SQL Server. Here I will explain with one example for that I have one table UserDetails like as shown below

Syntax to convert uppercase characters

If we want to convert characters to uppercase that syntax will be like this

SELECT UPPER(ColumnName) FROM TableName

SELECT UPPER(UserName) as UserName, UPPER(FirstName) as FirstName, UPPER(LastName) as LastName FROM UserDetails

Syntax to convert Lowercase characters

If we want to convert characters to lowercase that syntax will be like this

SELECT LOWER(ColumnName) FROM TableName

SELECT LOWER(UserName) as UserName, LOWER(FirstName) as FirstName, LOWER(LastName) as LastName FROM UserDetails

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


hareesh arava said...

The Query is good,where we use this type of query in real time applications,will you please explain with a example.


Vasantharaja I said...


Vasantharaja I said...

how to view the word file in using sql

Rajneesh Saini said...

Dear sir Suresh if we run this query it convert the coumn lower as well as upper.but when i use the SELECT*FROM "Tablename".the table have same reults as before...........................

so what it' use

r.k saini

Anonymous said...

rajneesh saini

when u write the query select upper(columnname) from table name that means it will show you only in uppercase but in the table the value could not be changed...

Anonymous said...

Hi! Here's my dilemma. How can I write a carrier name "EMPLOYERS" to output "Employers"?
I really don't need to lowercase the entire "EMPLOYERS" string. Can you please help? Thanks!

Give your Valuable Comments

Other Related Posts

© 2010-2012 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.