SQL UCASE() and SQL-Server UPPER() Function Example

SQL UCASE() and SQL-Server UPPER() Function

SQL UCASE() and SQL Server UPPER() both function used to convert text to uppercase and return it. In SQL we use UCASE() function and in sql server we use UPPER() for same purpose.
sql ucase and upper

SQL UCASE() and SQL Server UPPER() function

SQL UCASE() - The UCASE() function used to convert text to uppercase and return it.
The syntax of UCASE() for SQL:
UPPER() - The UPPER() function is used in sql server to convert text to uppercase and return it.
The syntax for UPPER() 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 uppercase.

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

Name City
MEERA BOMBAY
RAHUL SURAT
JAYESH AHMEDABAD
DHAVNISH BOMBAY
REENA BARODA
VEERA BARODA

 

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

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

Name City
MEERA BOMBAY
RAHUL SURAT
JAYESH AHMEDABAD
DHAVNISH BOMBAY
REENA BARODA
VEERA BARODA

Leave a Reply

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

5 + 7 =


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="">