0 votes
1 view
in SQL by (35.7k points)

Can anyone explain the Trim function in SQL?

1 Answer

0 votes
by (86.2k points)

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.

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 3 in SQL by Sudhir_1997 (35.7k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 13, 2019 in SQL by Tech4ever (20.3k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...