UPPER
UPPER is a function in SQL that converts all letters in a specified string to uppercase.
UPPER(str)
- str: This parameter represents the string that will be converted to uppercase. It refers to any valid string expression involving alphanumeric or special characters. It’s an input argument for the UPPER() function, and it’s where the user specifies the text to be manipulated.
Example
Output
Explanation
The UPPER()
function in MySQL converts all letters in the specified string to uppercase. In the given example, the string ‘mysql’ is converted to ‘MYSQL’.
UPPER(character_expression) RETURNS character_expression
- character_expression: The string expression that is to be converted to uppercase. It can be a combination of literal strings, binary data, strings or variables.
Example
Output
Explanation
The function UPPER is utilized in changing the input string ‘PostgreSQL’ to uppercase, resulting in the output ‘POSTGRESQL’.
UPPER( string_expression )
- string_expression: This is the string expression that is to be converted to uppercase. The string_expression is a SQL Server VARCHAR value or any valid SQL Server expression that returns a string data type.
Example
Output
Explanation
The UPPER
function in SQL Server converts all lowercase characters in a text string to uppercase. In this example, it changes ‘Hello World’ to ‘HELLO WORLD’.
UPPER(string)
- string: The string input parameter of the UPPER function represents the text string that will be converted to all uppercase letters. This parameter can be a text string directly, or a column name from a table which holds the text value that needs to be manipulated.
Example
Output
Explanation
In the given example, the UPPER
function is used to convert the lowercase string ‘oracle’ to uppercase. The transformed string ‘ORACLE’ is then selected from the dummy table dual
in Oracle. The output is ‘ORACLE’, which is the uppercase version of the input string.
UPPER(X)
- x: This parameter represents the string that will be converted to uppercase.
Example
Output
Explanation
The UPPER
function in SQLite is used to convert all characters of a string to uppercase. In the provided example, it converts ‘sqlite’ to ‘SQLITE’.