MySQL UPPER Function
MySQL UPPER Function
In this tutorial, we will learn about MySQL UPPER Function with some examples. We can use this function to convert the characters in the given string to uppercase format.
MySQL UPPER Function
The UPPER() function returns the string with all characters in the uppercase format.
Syntax
The general syntax of the function is as follows:
UPPER(<string>)
Examples
Let’s use the function and check the output of the function in this example.
mysql> SELECT UPPER(‘MySQL Tutorials’);
+————————–+
| UPPER(‘MySQL Tutorials’) |
+————————–+
| MYSQL TUTORIALS |
+————————–+
1 row in set (0.02 sec)
In this example, we will convert the column values of a database table into upper case. Let’s use the Country database table from the world MySQL database. The column is the Name column that contains the country name. Since the table has many rows will filter the output to rows from the ‘Europe’ continent.
mysql> SELECT Name, UPPER(Name)
-> FROM Country
-> WHERE Continent=’Europe’;
—
MySQL Tutorials
MySQL Tutorials on this website:
https://www.testingdocs.com/mysql-tutorials-for-beginners/