sql 块工作正常:
select * from aciktan_atama_tercihler LEFT OUTER JOIN (SELECT MIN(t.eklenme_tarihi) as row_id,
t.tcno,
t.hastane_kodu,
t.tercih_sira
FROM aciktan_atama_tercihler t
where t.silindi = '0'
GROUP BY tcno,
hastane_kodu,
tercih_sira) KeepRows ON aciktan_atama_tercihler.eklenme_tarihi = KeepRows.row_id
WHERE KeepRows.row_id IS NULL
and aciktan_atama_tercihler.silindi = '0'
但是,如果我将其更改为如下所示的删除,则会出现“ORA-00933:Sql 命令未正确结束”错误,我该如何解决?:
delete from aciktan_atama_tercihler LEFT OUTER JOIN (SELECT MIN(t.eklenme_tarihi) as row_id,
t.tcno,
t.hastane_kodu,
t.tercih_sira
FROM aciktan_atama_tercihler t
where t.silindi = '0'
GROUP BY tcno,
hastane_kodu,
tercih_sira) KeepRows ON aciktan_atama_tercihler.eklenme_tarihi = KeepRows.row_id
WHERE KeepRows.row_id IS NULL
and aciktan_atama_tercihler.silindi = '0'