w3resource

SQLite lower() function

Description

SQLite lower() converts all the characters in a string to lowercase characters.

The lower(str) function returns a copy of string str with all ASCII characters converted to lower case. The default built-in lower() function works for ASCII characters only.

Syntax:

lower(str)

Argument:

Name Description
str A string whose characters are going to be converted to lowercase.

Pictorial Presentation

SQLite LOWER() pictorial presentation

Example: SQLite LOWER() function

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

SELECT LOWER('MY TEST STRING'); 

Here is the result.

Sample Output:

LOWER('MY TEST STRING')
-----------------------
my test string

Example of LOWER() function on column of a table

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

Sample table: employees


SELECT email,lower(email) 
FROM employees
LIMIT 10;

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

Sample Output:

email       lower(email)
----------  ------------
SKING       sking
NKOCHHAR    nkochhar
LDEHAAN     ldehaan
AHUNOLD     ahunold
BERNST      bernst
DAUSTIN     daustin
VPATABAL    vpatabal
DLORENTZ    dlorentz
NGREENBE    ngreenbe
DFAVIET     dfaviet

Previous: like()
Next: ltrim()



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/sqlite/core-functions-lower.php