Cannot delete from view without exactly one key-preserved table workaround
<p>I have a table x_visa. I want to delete the duplicate columns from this table.</p>

<p>The query I am using for this is :</p>

<pre><code>  select * from   (SELECT x_visa.*,
                ROW_NUMBER() over (partition by effective_start_date, effective_end_date, person_id,
                   business_group_id, legislation_code , current_visa_permit, visa_permit_type, visa_permit_id, configuration_id
               order by person_id) AS rn
        from   x_visa) T
WHERE  rn &gt; 1 ); 
</code></pre>

<p>The delete statement is giving an error :ORA-01752: cannot delete from view without exactly one key-preserved table</p>

<pre><code>delete from
(select * from   (SELECT x_visa.*,
                ROW_NUMBER() over (partition by effective_start_date, effective_end_date, person_id,
                   business_group_id, legislation_code , current_visa_permit, visa_permit_type, visa_permit_id, configuration_id
               order by person_id) AS rn
        from   x_visa) T
WHERE  rn = 1 ); 
</code></pre>

<p>Is there a workaround to delete the duplicate data from this table ?</p>