PostgreSQL LOWER() function
LOWER() function
The PostgreSQL lower function is used to convert a string from upper case to lower case.
Syntax:
lower(string)
Parameters:
Name | Description |
---|---|
string | A string whose characters are going to be converted to lowercase. |
PostgreSQL Version: 9.3
Pictorial Presentation

Example: PostgreSQL LOWER() function
The following PostgreSQL statement returns the given string after converting all of its characters in lowercase.
Code:
SELECT lower('W3RESOURCE') AS "Upper to Lower";
Sample Output:
Upper to Lower ---------------- w3resource (1 row)
Example of LOWER() on column of a table :
Sample Table: employees.
If we want to display the first name, last name, email and the lower of email of those employees who belong to the dept 20 from the employee table, the following SQL can be executed:
Code:
SELECT first_name,last_name,
email,LOWER(email)
FROM employees
WHERE department_id=20;
Sample Output:
first_name | last_name | email | lower ------------+-----------+----------+---------- Michael | Hartstein | MHARTSTE | mhartste Pat | Fay | PFAY | pfay (2 rows)
Previous: CHAR_LENGTH function
Next: OCTET_LENGTH function
- 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
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