0
我有一個表x_visa。我想從此表中刪除重複的列。無法從視圖中刪除沒有完全保存一個保存表的解決方法
我使用這個查詢是:
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);
DELETE語句給了一個錯誤:ORA-01752:無法從視圖中刪除,也不一定是一個關鍵的保存完好的表
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);
是否有解決方法來刪除此表中的重複數據?