UPPER function in SQL Server

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 :

  1. string : the string you want to convert, can be a string of characters with text, variables, string expressions or table columns.

Note :

  1. See more LOWER functions for reverse conversion.
  2. 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'

Previous article: SUBSTRING function in SQL Server

Next lesson: ABS function in SQL Server

5 ★ | 1 Vote

May be interested

  • SUBSTRING function in SQL ServerPhoto of SUBSTRING function in SQL Server
    the article will explore and guide you how to use the substring function in sql server to extract a substring from a specified string.
  • ABS function in SQL ServerPhoto of ABS function in SQL Server
    this article will show you in detail how to use the abs () handling function in sql server with specific syntax and examples to better visualize and capture functions.
  • AVG function in SQL ServerPhoto of AVG function in SQL Server
    the avg function in sql server returns the average value of an expression or average value according to the specified column of the selected row.
  • CEILING function in SQL ServerPhoto of CEILING function in SQL Server
    the ceiling function in sql server returns the smallest integer value greater than or equal to the transmitted numeric expression.
  • FLOOR function in SQL ServerPhoto of FLOOR function in SQL Server
    the floor function in sql server returns the largest integer value but less than or equal to the transmitted numeric expression.
  • COUNT function in SQL ServerPhoto of COUNT function in SQL Server
    this article will show you in detail how to use functions that handle count () numbers in sql server with specific syntax and examples to better visualize and capture functions.