Write a query to delete duplicate records in SQL SERVER
Answer Posted / vinod singh kushwah
Delete From Tablename where(ID Not in (Select max(ID) from
Tablename Group by name))
Tablename :Friend
ID Name Age city
101 vinod 22 Gwalior
102 Pritesh 23 Gwalior
102 Pritesh 23 Gwalior
103 Arvind 24 Gwalior
Here Id-102 is repeated so friend if u want to delete this
duplicate raw Try Above code in Sql-sever
| Is This Answer Correct ? | 4 Yes | 13 No |
Post New Answer View All Answers
What is the primary use of the model database?
How to provide default values to function parameters?
When should you use an instead of trigger?
Equi join and non equi join is possible with sql server?
How to convert character strings into numeric values?
How can I check that whether automatic statistic update is enabled or not?
How do I find the sql server version?
What are wait types?
How to rebuild the master database?
How to connect php with different port numbers?
What is sql or structured query language?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
How do I create a trace in sql server?
What is a scheduled job or what is a scheduled task?
What are the different subsets of sql?