PLSQL | RTRIM Function Last Updated : 04 Feb, 2021 Comments Improve Suggest changes Like Article Like Report The PLSQL RTRIM function is used for removing all specified characters from the right-hand side of a string. The PLSQL RTRIM function accepts two parameters which are input_string and trim_string. If the user does not specify trim_string, it defaults to a single blank. If char is a character literal, then you must enclose it in single quotes. Oracle Database begins scanning char from its first character and removes all characters that appear in trim_string until reaching a character not in trim_string and then returns the result. Syntax: RTRIM( input_string [, trim_string] ) Parameters Used: input_string - It is used to specify the string whose characters need to be trimmed from the right hand side.trim_string - It is an optional parameter which is used to specify the string that will be removed from the right-hand side of input_string. If this parameter is omitted, the RTRIM function removes all leading spaces from input_string. Supported Versions of Oracle/PLSQL: Oracle 12cOracle 11gOracle 10gOracle 9iOracle 8i Example-1: DECLARE Test_String string(25) := 'Geeksforgeeks '; BEGIN dbms_output.put_line(RTRIM(Test_String)); END; Output: Geeksforgeeks Example-2: DECLARE Test_String string(25) := 'Geeksforgeeks '; BEGIN dbms_output.put_line(RTRIM(Test_String, ' ')); END; Output: Geeksforgeeks Example-3: DECLARE Test_String string(25) := 'Geeksforgeeks123'; BEGIN dbms_output.put_line(RTRIM(Test_String, '123')); END; Output: Geeksforgeeks Example-4: DECLARE Test_String string(25) := 'Geeksforgeeks123123'; BEGIN dbms_output.put_line(RTRIM(Test_String, '123')); END; Output: Geeksforgeeks Example-5: DECLARE Test_String string(25) := 'Geeks123forgeeks123'; BEGIN dbms_output.put_line(RTRIM(Test_String, '123')); END; Output: Geeks123forgeeks Comment More infoAdvertise with us Next Article PLSQL | RTRIM Function S Shubrodeep Banerjee Follow Improve Article Tags : SQL SQL-PL/SQL Similar Reads PLSQL | TRIM Function The PLSQL TRIM function is used for removing all specified characters either from the beginning or the end of a string. The TRIM function accepts three parameters among which the first parameter can either have one of the values 'LEADING', 'TRAILING', 'Both' and Trim_character and input_string. If L 2 min read PLSQL | SQRT Function In PL/SQL, the SQRT function is used to find the square root of a number. This function is really handy for various tasks that involve mathematical calculations, such as analyzing statistics, solving geometry problems, or handling financial data. The SQRT function is easy to use and can simplify com 4 min read PLSQL | TRUNC Function The TRUNC function is an inbuilt function in PLSQL which is used to return a number truncated to a particular number of decimal places. Syntax: TRUNC( number, decimal_places ) Parameters Used: This function accepts two parameters which are illustrated below:- number - This is the input number which 2 min read RTRIM() Function in MySQL RTRIM() : It is the function in MySQL that is used to remove trailing spaces from a string. Syntax : RTRIM(str) Parameter : RTRIM() function accepts one parameter as mentioned above and described below. str âThe string from which we want to remove trailing spaces. Returns : It returns a string after 3 min read PLSQL | TAN Function The TAN function is an inbuilt function in PLSQL which is used to return the tangent of an input number. The tangent is a trigonometric function of an angle and here the input number is the angle expressed in the form of radians. 180 degree is equal to pi radian. Syntax: TAN( number ) Parameters Use 1 min read Like