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
As per your opinion what are the five top responsibilities of a dba? : sql server database administration
What is primary key, unique key, and foreign key?
What is query processing?
What the class forname () does?
Does the order of columns in update statements matter?
What is data source in connection string?
How to convert numeric expression data types by assignment operations?
What is lock escalation? : sql server database administration
Difference between report and query parameter.
How to assign new column names in a view?
What are views used for?
What is the difference between a fill factor of 100 and 0?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
How to display a past time in days, hours and minutes?
What is the difference between push and pull subscription? : sql server replication