SQL server tips

prevent SQL Server from giving you informational messages during and after a SQL statement execution? SET NOCOUNT OFF By Mistake, Duplicate records exists in a table, how can we delete copy of a record ? with T as ( select * , row_number() over (partition by VID order by VID) as rank from dbo.tbl_AppVolunteers ) delete from T where rank > 1