Mysql Ucase Function

MySQL: UCASE Function

This tutorial explains how to use the MySQL UCASE function with syntax and examples.

Description

The MySQL UCASE function converts all characters in the specified string to uppercase. If there are characters in the string that are not letters, they are unaffected by this function.

Syntax

The syntax for the UCASE function in MySQL is:

UCASE( string )

Parameters or Arguments

string

The string to convert to uppercase.

Note

  • The UCASE function will convert the characters using the current character mapping set, which is latin1, by default.
  • The UCASE function is a synonym for the UPPER function.

Applies To

The UCASE function can be used in the following versions of MySQL:

  • MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

Example

Let's look at some MySQL UCASE function examples and explore how to use the UCASE function in MySQL.

For example:

mysql> SELECT UCASE('AODBA.com 123   ');
Output: 'AODBA.COM 123   '