Blogger

Delete comment from: Java67

Anonymous said...

for selecting the distinct records:

select * from emp a where rowid = (select max(rowid) from emp b where a.empno=b.empno)


to Delete:

delete from emp a where rowid != (select max(rowid) from emp b where a.empno=b.empno);

Nov 14, 2013, 2:25:25 AM


Posted to Top 10 Frequently asked SQL Query Interview Questions Answers

Google apps
Main menu