Cleaning Right and Left Spaces in SQL Server
Hello everyone. In this article, I will give information about cleaning left and right spaces in SQL Server.
In SQL Server you may want to clear left and right spaces in some cases.
You can easily do this using the code below.
You can use the code below to clear left and right spaces in SQL Server 2017 and above.
SELECT
TRIM(' Yavuz Selim Kart ') AS Sonuc
You can use the code below to clear left and right spaces in SQL Server 2016 and below.
SELECT
LTRIM(RTRIM(' Yavuz Selim Kart ')) AS Sonuc
By using the codes above, you can clear the left and right spaces in the column.
Good luck to everyone in business and life.