UPPER() function in SQL Server

UPPER() function converts the string into all uppercase characters. We can use this function to maintain the data integrity of text columns in the tables.


Suppose we have a table ‘tbl_employee’

Table name: tbl_Employee

Employee Id EmpName Salary Department
1 Ankur 1200 Sales
2 David 3400 Sales
3 John 1500 HR
4 James 1200 Production
5 Mohan 4500 Production
6 Ram 2300 HR

See the following sql query and its output

    SELECT UPPER(EmpName), Department FROM tbl_Employee

    And output will look like this:

    EmpName Department
    ANKUR Sales
    DAVID Sales
    JAMES Production
    MOHAN Production
    RAM HR