PostgreSQL RIGHT() function
The PostgreSQL right() function is used to extract n number of characters specified in the argument from the right of a given string. When the value of n is negative, the extraction will happen from the right except for first n characters.
PostgreSQL Version: 9.3
Pictorial Presentation of PostgreSQL RIGHT() function
Example 1: PostgreSQL RIGHT() function:
In the example below, the rightmost five characters from the string 'w3resource' have been extracted.
right ------- ource (1 row)
In the example below, the right function extracted all the characters from the right side except 3 leftmost characters from the string 'w3resource', because the value of extracting character number is negative.
right --------- esource (1 row)
- 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
- 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