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
How to create user defined functions with parameters?
Define full outer join in sql server joins?
What is the web service used for reporting services?
How to view existing indexes on an given table using sys.indexes?
Give an example of why you would want to denormalize a database
Write a query for primary key constraint with identity key word?
How to remove duplicate rows from table?
What is right outer join in sql server joins?
What is database replication? What are the different types of replication you can set up in sql server?
mention different types of relationships in the dbms?
How to rename an existing table with the "sp_rename" stored procedure in ms sql server?
What is a join in sql?
How to list all field names in the result set using mssql_field_name()?
What do you understand by check constraint in sql server?
Can you create a logon trigger in sql server 2005 express edition?