SQLite upper() function


SQLite upper() converts all the characters in a string to uppercase characters.

The upper(X) function returns a copy of input string X in which all lower-case ASCII characters are converted to their upper-case equivalent.



SQLite Version: 3.8.5


Name Description
X A string whose characters are to be converted to uppercase.

Pictorial Presentation

SQLite UPPER() pictorial presentation

Example: SQLite upper() function

The following SQLite statement returns the given string after converting all of its characters in uppercase.

SELECT upper('my test string');

Here is the result.

Sample Output:

upper('my test string')

Example of upper() function on column of a table

The following SQLite statement returns the value of the column first_name from employees table after converting it from lower to upper case.

Sample table: employees

SELECT first_name,upper(first_name) 
FROM employees

Here is the result. Here we have displayed the result only 10 rows as a sample result.

Sample Output:

first_name  upper(first_name)
----------  -----------------
Steven      STEVEN
Neena       NEENA
Lex         LEX
Alexander   ALEXANDER
Bruce       BRUCE
David       DAVID
Valli       VALLI
Diana       DIANA
Nancy       NANCY
Daniel      DANIEL

Previous: typeof()
Next: Date and Time Functions Introduction

Follow us on Facebook and Twitter for latest update.

We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook