Write a query to delete duplicate records in SQL SERVER
Answer Posted / chandran.s
Table Name: Example
Name Age
chandran 23
ranjith 24
chandran 23
To delete one of the duplicate records use following query
delete from example where age in(select age from example
group by age having count>1)
| Is This Answer Correct ? | 13 Yes | 46 No |
Post New Answer View All Answers
You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?
How will you go about resolving deadlocks?
How to set database to be read_only in ms sql server?
What is it’s similarity with sql server?
How to create user defined functions with parameters?
What are three major types of constraints?
Do you know what is user defined datatypes and when you should go for them?
Explain the phases a transaction has to undergo?
Explain about unique identifier data type in sql server?
What is the purpose of grouping data in a report?
Difference between primary key and clustered index?
Can a database be shrunk with users active?
Explain the collation?
What is snapshot parameter in ssrs?
How to create nested stored procedure?