HomeОбразованиеRelated VideosMore From: WingsOfTechnology

How to delete duplicate records from a table in oracle

25 ratings | 15110 views
Let c how to remove duplicates from a table..I have one table here 'student' It has two duplicate records. 3 joe 4 robert These two records has duplicates. So I have to remove them. I can remove them using rowid functionality using one subquery. You can give different column names in GROUP BY clause. to identify the duplicate record. You can give just primary key values also. Duplicate rows are deleted now... Query used in video: delete from student where rowid not in (select min(rowid) from student group by sno,sname); Thanks for watching...:)
Html code for embedding videos on your blog
Text Comments (6)
Table 'ksrbloodapp' is specified twice, both as a target for 'DELETE' and as a separate source for data what should i do? DELETE FROM `ksrbloodapp` WHERE `id` NOT IN (SELECT MIN(`id`) _ FROM `ksrbloodapp` GROUP BY name,regno,bg,gender,dob,mobno,district,city,dontdis,regdate,password) the query is above
Shivam Csd (3 years ago)
THANK YOU SIR
WingsOfTechnology (3 years ago)
+Shivam Csd You are welcome :)
amiya Mohanty (3 years ago)
SIR, PLZ UPLOAD WITH YOUR VOICE
nn jj (11 days ago)
+WingsOfTechnology why can't we use max I'd why min I'd not in
WingsOfTechnology (3 years ago)
+amiya Mohanty Hi Mohanty, My new videos have voice. Thanks for your comment.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.