Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Delete record

User_JIAY3Jul 29 2013 — edited Jul 29 2013

Hi,

Created three tables and group by 3 tables column name. want to delete duplicate record without first table(test).

Delete the duplicate record in test1 and test2 except test. kindly help me.

SELECT a as Name,b as M_Name, c as L_Name, count(*)

  FROM (

        SELECT first_name as a, middle_name as b, last_name as c FROM test

        UNION ALL

        SELECT first_name as a, middle_name as b, last_name as c FROM test1

        UNION ALL

        SELECT first_name as a, middle_name as b, last_name as c FROM test2

       ) as count

GROUP BY a,b,c

HAVING count(*) > 1

Comments

Answer

Reproduced, bugged, thank you.

Marked as Answer by Graeme Douglas · Mar 18 2022
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 26 2013
Added on Jul 29 2013
6 comments
529 views