Jump to: navigation, search

PostgreSQL RIGHT

From w3cyberlearnings

Contents

Postgresql right

This function returns last n characters in the string. If the length is negative, it returns all character but the first n characters.

Syntax right

right(string,length)

Example 1

postgres=# SELECT right('apple',2);
 right 
-------
 le
(1 row)

Example 2

postgres=# SELECT right('apple',-2);
 right 
-------
 ple
(1 row)

Related Links


Navigation
Web
SQL
MISC
References