How to Use the Trim Function
Tutorials Shared by the Internet Community
Total Hits - 27057
Total Votes - 102 votes
Vote Up - 44 votes
Vote Down - 58 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 ...