The article will explore and show you how to use UPPER function in SQL Server to convert letters in a specified string to uppercase.
Describe
UPPER function in SQL Server converts all the letters in the string specified to uppercase. If there are characters in a string other than letters, it is not affected by this function.
Syntax
To use UPPER function in SQL Server, we use the following syntax:
UPPER(chuoi)
Parameters :
- string : the string you want to convert, can be a string of characters with text, variables, string expressions or table columns.
Note :
- See more LOWER functions for reverse conversion.
- The UPPER function can be used in later versions of SQL Server: SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, and SQL Server 2005.
For example
Take a look and explore some examples of UPPER functions in SQL Server.
SELECT UPPER('quantrimang.com');
Result: 'QUANTRIMANG.COM'
SELECT UPPER('QuanTriMang.com');
Result: 'QUANTRIMANG.COM'
SELECT UPPER('Quan Tri Mang');
Result: 'QUAN TRI MANG'