Shared Tutorials
Tutorials Shared by the Internet Community
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Basic Detail
How to Use the Trim Function
Sometimes with outputted data, comes unwanted white space. The trim function is used for this in SQL.http://www.sqltutorials.net/concantenate/how-to-use-the-trim-function.html
Total Hits: 4207
Total Votes: 36 votes
Average Rating: 2.5 out of 5
Category: Basic SQL/Misc
Description:
When running more complex queries, such as concatenating strings, often times you may need to trim whitespace from the values.Let’s look at an example of this. Remember the query we ran for concatenating:
SELECT CONCAT (productName, ” , ” , price) FROM products;
As it is the output would be XBOX , $399
Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 16.67% |
6 |




16.67%

16.67%

16.67%

16.67%

16.67%