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
What are the differences between triggers and stored procedures?
Tell me what is the order in which the sql query is executed?
Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What do you mean by normalisation?
what is denormalization? : Sql server database administration
What is the difference between set and select?
You want to implement the one-to-many relationship while designing tables. How would you do it?
How to get a list of columns in a view using "sys.columns" in ms sql server?
When we should use and scope of @@identity?
How many types of subqueries are there in sql server?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
What is a collation in ms sql server?
What is sharding?
What does select 1 mean?
How do I find my localdb version?