SQL UPPER() function
UPPER() function
The SQL UPPER() function is used to convert all characters of a string to uppercase.
Syntax:
UPPER(string)
PostgreSQL, MySQL, SQL Server and Oracle
All of above platforms support the SQL syntax of UPPER().
Parameters:
Name | Description |
---|---|
string | A string. |
Pictorial Presentation:
Application of UPPER()
In the subsequent pages, we have discussed how to apply UPPER() with various SQL clauses. we have used Oracle 10g Express Edition.
Example:
To get string the 'testing for upper function' in upper case from the DUAL table, the following SQL statement can be used :
SQL Code:
SELECT UPPER('testing for upper function')
AS Testing_Upper
FROM dual;
In the above example 'Testing_Upper' is a column alias which will come as a column heading to the output.
Output:
TESTING_UPPER -------------------------- TESTING FOR UPPER FUNCTION
Here is a new document which is a collection of questions with short and simple answers, useful for learning SQL as well as for interviews.
Check out our 1000+ SQL Exercises with solution and explanation to improve your skills.
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join