Skip to content
Advertisement

How to delete row contain specific string on it in SQL Server

There are lots of rows that contain ’08:28:00.000′ in my table,like this one:

I want to delete all the rows that ‘datetime’ contains ’08:28:00.000′.Instead of deleting this kind of rows one by one,is any command can delete all the rows than datetime contain ’08:28:00.000′?

Advertisement

Answer

Try using a range delete query here, after extracting time from the datetime column:

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