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 / dinesh gupta
Kumar your query do not solve the purpose accurately.
It should be as
Delete from employee where empid
not in (Select min(empid) from employee group by empname
having count(empname)>=1)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what is a deadlock? : Sql server database administration
What is database architecture? : SQL Server Architecture
What is partition, how will you implement it? : sql server analysis services, ssas
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
Explain the difference between primary keys and foreign keys?
How do I know if localdb is running?
What is log shipping?
To automatically record the time on which the data was modified in a table, which data type should you choose for the column?
How to create new tables with "select ... Into" statements in ms sql server?
Define clusters?
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
What is statement level trigger?
What is ems sql management studio? : sql server management studio
Explain what is lock escalation?
What do you understand by physical_only option in dbcc checkdb?