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 / karna
delete from emp where empid not in(select max(empid) from
emp group by empname having count(*)>=1)
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we take the full database backup in log shipping?
Does group by or order by come first?
How do I port a number to sql server?
Write a SQL query to delete a table?
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
How many types of functions are there in sql server?
What is the difference between a primary key and a unique key? Are they the same?
What is a database in ms sql server?
How much memory that we are using in Logshipping Concept?
What is Federation and Federation Member?
How is table type constraint applied to a table?
What does the update command do?
Explain what is the purpose of sql profiler in sql server?
What are diverse clauses that form a part of sql?
Mention a few common trace flags used with sql server?