Skip to content
Advertisement

How to replace empty spaces with NULL

I have a column in sql server 2012 which contain white spaces. I want to replace these empty spaces with NULL. I have written the following query but its not working.

How to achieve the above functionality. Thanks in advance.

Advertisement

Answer

Use nullif

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement