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 / akshita

delete from emp where rowid not in (select max(rowid) from
emp group by empno)

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does sql backup shrink transaction log?

563


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2015


What are sql built in functions?

519


How to get unique records from a table?

531


how would you enter characters as hex numbers? : Sql dba

526






Is pl sql a scripting language?

599


What is the purpose of design view?

535


Does a user_objects view have an entry for a trigger?

577


what is error ora-03113: end-of-file on communication channel?

612


Does sql view stored data?

546


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1733


What is left join in postgresql?

547


when is the use of update_statistics command? : Sql dba

508


how to create a table index in mysql? : Sql dba

605


how to include character strings in sql statements? : Sql dba

564