in tabase table having a column in it empname field is
there which having 5 duplicate values is there i want
deleted all the duplicates i want showing only one name
only.
Answer Posted / kumar
Table structure :-
empid empname
1 bala
2 bala
3 bala
4 bala
5 arun
6 arun
7 arun
8 ram
9 ram
Delete from employee where empid
not in (Select min(empid) from employee group by emp
having count(empid)>1)
By
Kumar
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
In what version of sql server were synonyms released?
What are the types of sql server?
How will you hide an attribute? : sql server analysis services, ssas
How do I find the transaction log size in sql server?
What are triggers in ms sql server?
Can we deploy SSRS reports on our personal website?
Write an sql query for deleting duplicate rows?
Explain trigger and its types?
Describe and explain about SQL native client?
What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
Explain primary key and foreign key constraints?
What is resource governor?
what are different types of raid configurations? : Sql server database administration
How to create user defined functions with parameters?