How to Use the Trim Function
Tutorials Shared by the Internet Community
Total Hits - 33534
Total Votes - 106 votes
Vote Up - 47 votes
Vote Down - 59 votes
Domain - www.sqltutorials.net
Category - Basic SQL/Basic SQL Misc
Submitted By - Shekhar
Submitted on - 2008-04-11 10:16:17
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 More detail...