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
How do you improve the performance of a SQL Azure Database?
What are the differences between stored procedure and view in sql server?
What is the difference between DataRow.Delete() and DataRow.Remove()?
Is candidate a key?
What is the security principal at the database level that represents your session?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
How does a profiler work?
What is index fragmentation in ms sql server?
How can you check the level of fragmentation on a table?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
What's the information that can be stored inside a bit column?
What is a trace frag? Where do we use it?
Explain the usage of floor function in sql server.
What is always encrypted?
What is the correct order of the logical query processing phases?