Updated on 2026-11-06 GMT+08:00

upper/ucase

The upper function is used to convert a text string to all uppercase letters.

Syntax

upper(string A) 

or

ucase(string A) 

Parameters

Parameter

Mandatory

Type

Description

A

Yes

STRING

The text string to be converted.

Return Values

Returns STRING type.

  • If the input parameter is not of type STRING, BIGINT, DOUBLE, DECIMAL, or DATETIME, an error is returned.
  • If the input parameter is NULL, NULL is returned.

Example Code

Convert lowercase characters in the string to uppercase characters. The command example is as follows.

Returns ABC.

select upper('abc'); 

The input parameter is NULL. The command example is as follows.

Returns NULL.

select upper(null);