In SQL, TRIM () function is used to remove the characters from the starting or ending of strings and removes the padded spaces on both sides of the string.
Here is an example to used TRIM () function in SQL:
SELECT TRIM ('@! ' FROM ' !SQL [email protected] ') AS Trimmed_String;
You will get the result as ‘SQL Tutorial’ on running the above SQL. You can also use RTRIM () function to remove the spaces at the starting of the string and LTRIM() to remove the spaces at the end of the string.
If you want to take a course that can provide Instructor-led training and certification then check out this SQL Certification program by Intellipaat.