SQL Server Select Statement and Delete
Article Entry Date: February 23,2024 @ 12:34:09 / Last Updated On: February 23,2024 @ 12:34:54
How do you delete an IS NULL value from a Select Statement in SQL Server?
I found out that I had duplicate entries in one of our tables on the new Radio website, and I wanted a better way of deleting the duplicates. While looking at the data, I noticed NULL values on one record and a value on the other, so I created the following code.
This will delete the record with a Where clause.
DO NOT run the above code without a WHERE Clause, as you will delete all your records. Make sure you have a backup of your data before testing.