Delete with CTE

  1. With CTE as   
  2. (  
  3. Select Id,city,[state],row_number() over (partition by City,[state] order by City) as CityNumber from [CityMaster]  
  4. )  
  5. delete from CTE where CityNumber >1   

Comments

Popular posts from this blog

loop example

View vs Partial View MVC