Write a query to delete duplicate records in SQL SERVER
Answer Posted / nag
create table MMM(Name varchar(20),age int)
select * from MMM
insert into MMM values('MIKE',20)
insert into MMM values('Shuck',30)
insert into MMM values('Shuck',30)
insert into MMM values('Sh',90)
insert into MMM values('Shuc',60)
insert into MMM values('Sonu',70)
insert into MMM values('Siddu',80)
insert into MMM values('nagu',50)
SELECT name,age
FROM mmm
GROUP BY name,age
HAVING count(*) <=1
Try this query friends it will work out
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain sub-query?
Where in ms sql server is ’100’ equal to ‘0’?
What happens when converting big values to integers?
What are acid properties of transaction?
What is change data capture (cdc) in sql server 2008?
what is denormalization and when would you go for it? : Sql server database administration
What are “lock” hints?
What is compression - row-level and page-level compression?
what is spatial nonclustered index
What are the ways available in sql server to execute sql statements?
What is the advantage of sql server?
What do we need queues in sql service broker?
What structure can you implement for the database to speed up table reads?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
What are indexers?