SQL UPPER() Function

SQL UPPER() function is used to convert character string from lower case to upper case.


UPPER (CharacterString)

Below is an example converting small letter character string to upper case.

SELECT UPPER('sqlserverlog.com') AS MyWebsite

Small letter string ‘sqlserverlog.com’ is converted to ‘SQLSERVERLOG.COM’ by using UPPER() function. In this manner you can use this function to compare strings or for application requirements.

We will take one example from Student table as shown below. Here we are converting FirstName column to upper case letters.

SELECT UPPER(FirstName) AS UpperFirstName, FirstName FROM Student


If you will compare two columns, FirstName and UpperFirstName both columns have same name but we have used UPPER() function in first column to get the FirstName column in upper case.

Reference: Manzoor Siddiqui [www.SQLServerLog.com]

You may also like...

Leave a Reply

Your email address will not be published.