SQL LCASE() and SQL-Server LOWER() Function Example

SQL LCASE() and SQL-Server LOWER() Function

SQL LCASE() and SQL Server LOWER() both function used to convert text to lowercase and return it. In SQL we use LCASE() function and in sql server we use LOWER() for same purpose.

sql lcase and lower function

sql LCASE() and sql server LOWER() function

SQL LCASE() - The LCASE() function used to convert text to lowercase and return it.
The syntax of LCASE() for SQL:
LOWER() - The LOWER() function is used in sql server to convert text to lowercase and return it.
The syntax for LOWER() in SQL Server:

Here, SQL Table_Name = StudentMst

SELECT * FROM StudentMst

ID Name City Pincode Mobile
1 Meera Bombay 380022 7874555555
2 Rahul Surat 352200 7874444444
3 Jayesh Ahmedabad 352200 7874333333
4 Dhvanish Bombay 380022 7874111111
5 Reena Baroda 352222 7874666666
6 Veera Baroda 352222 7874121212

 

Below sql statement select the column Name and City from table StudentMst and convert both column to lowercase.

SELECT LCASE(Name) AS Name, LCASE(City) AS City FROM StudentMst

Name City
meera bombay
rahul surat
jayesh ahmedabad
dhvanish bombay
reena baroda
veera baroda

 

Below sql server statement select the column Name and City from table StudentMst and convert both column to lowercase.

SELECT LOWER(Name) AS Name, LOWER(City) AS City FROM StudentMst

Name City
meera bombay
rahul surat
jayesh ahmedabad
dhvanish bombay
reena baroda
veera baroda

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + 3 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">