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 PLSQL | SIN Function The PLSQL SIN function is used to return the sine of a numeric value. The SIN function accepts one parameter which is the number whose sine needs to be calculated. The SIN function returns a value of the numeric data type. This function takes as an argument any numeric data type as well as any non-n 2 min read PLSQL | SUBSTR Function The PLSQL SUBSTR function is used for extracting a substring from a string. The SUBSTR function accepts three parameters which are input_string, start_position, length. SUBSTR calculates lengths using characters as defined by the input character set. SUBSTRB uses bytes instead of characters. Note: I 2 min read PLSQL | RPAD Function The PLSQL RPAD function is used for padding the right-side of a string with a specific set of characters. a prerequisite for this is that string shouldnât be NULL. The RPAD function in PLSQL is useful for formatting the output of a query. The RPAD function accepts three parameters which are input_st 2 min read TRIM() Function in MySQL TRIM() function in MySQL is used to clean up data. It is also used to remove the unwanted leading and trailing characters in a string. Syntax : TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str) Parameter : This method accepts three-parameter as mentioned above and described below : BOTH | LEADIN 2 min read SQL | String functions SQL String Functions are powerful tools that allow us to manipulate, format, and extract specific parts of text data in our database. These functions are essential for tasks like cleaning up data, comparing strings, and combining text fields. Whether we're working with names, addresses, or any form 7 min read Like