How to Remove Space with dash (-) in SQL Server

In this article, we learn how to replace space with the dash in SQL Server. As we know that space (white space) is a character and dash is also a character.Many developers read about the replace query or replace function in SQL server when if someone asked about How to Remove Space with the dash (-) in SQL Server then he thinks so much so this article will help you.

Table (info_table)




For All Columns
Query:-





update info_table
set address = replace(address, ' ', '-')

Out-Put:-



Selected Columns

update info_table
set address = replace(address, ' ', '-') where uid=1


Out-Put


How to Remove Space with dash (-) in SQL Server How to Remove Space with dash (-) in SQL Server Reviewed by NEERAJ SRIVASTAVA on 10:00:00 PM Rating: 5

No comments:

Powered by Blogger.