Quick Search:
 
 The Oracle RTRIM Function      [Return To Index] Jump to:  

Term: RTRIM

Definition:
The Oracle RTRIM function removes trailing spaces from a string or column. Space characters are the default, but you can also specify the character(s) to be removed. Characters can be specified as literals ('A', 'm', etc) or by their CHR equivalents: 'CHR(112)', 'CHR(68)'.

The RTRIM function returns a value with datatype VARCHAR2.

Example (Default) Syntax:

RTRIM();


Example Syntax for specifying a literal character:

SELECT RTRIM('Z' FROM 'Zebra') FROM dual;


Example Syntax for specifying a character by its CHR() value:

SELECT RTRIM(CHR(90) FROM 'Zebra') FROM dual;


Also See:
Definition & Examples: TRIM Function
Definition & Examples: LTRIM (Left Trim) Function

Related Links:

Related Code Snippets:
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org