How to delete same emp id in sql query for exmaple in emp
table emp id, empname, emp address. for example emp id =5,
repeated in two times in rows same id how to delete same
empid please any one of the write query send in my id

Answer Posted / rohit kumar

Delete from employee where (empid,empname) notin (select min
(empid),empname from employee group by enmpname);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is “go” in t-sql? : Transact sql

596


How do I start sql profiler?

554


Is sql better than excel?

517


What is partition by in sql?

568


What is program debugging?

558






What is the difference between nested table and varray?

514


How can I get the number of records affected by a stored procedure?

570


Is it possible to link two groups inside a cross products after the cross products group has been created?

589


Explain alias in sql?

582


How to check if a column is nullable before setting to nullable?

580


Which command is used to delete a trigger?

768


How many types of functions are there in sql?

498


how can we submit a form without a submit button? : Sql dba

534


What is cost in sql execution plan?

486


explain the difference between delete , truncate and drop commands? : Sql dba

546