MySQL UPPER is one of the String Function, which is used to convert the given character expression to uppercase. In this article we will show you, How to use this string UPPER in MySQL with example.
The basic syntax of the UPPER Function in MySQL is as shown below:
SELECT UPPER (Expression) FROM [Source]
In order to demonstrate this string Upper function, We are going to use the customer details table data that we shown below
MySQL UPPER Example 1
The Uppercase Function in MySQL is used to convert the user specified expression into uppercase. The following query will show multiple ways to use this function.
SELECT UPPER('Hello World'); SELECT UPPER('tutorial gateway'); -- Let me try NULL value SELECT UPPER(NULL);
UPPER Function Example 2
In this example, we are going to implement the MySQL string UPPER function on different set of columns in a table. Following statement will return convert the string data in First_Name, Last_Name, and Education column to uppercase.
-- MySQL String UPPER Example USE company; SELECT First_Name, UPPER(First_Name) AS FName_Upper, Last_Name, UPPER(Last_Name) AS LName_Upper, Education, UPPER(Education) AS Edu_Upper, Profession, Yearly_Income, Sales FROM customerdetails;
Thank You for Visiting Our Blog