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
Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
Distinguish between commit and rollback?
Can you explain about buffer cash and log cache in sql server?
How to configure and test odbc dsn settings?
What is nonclustered index with included columns ?
What are the advantages of passing name-value pairs as parameters?
Define cross join in sql server joins?
What is difference between group by and having?
Define cursor locking
What is similarity and difference between truncate and delete in sql?
what is the sql equivaent of the dataset relation object ?
What are the basic features of a trigger in ms sql server?
What do you understand by triggers and mention the different types of it?
When would you use sql joins?
What stored procedure would you use to view lock information?