Du kan ikke bruge Subquery Factoring/CTE med andet end SELECT-sætningen. Fra dokumentationen:
Du kan gøre dette:
DELETE FROM tbl WHERE tbl.id IN
(WITH X AS (), Y AS (), Z AS ()
SELECT id FROM TBL
WHERE TBL.ID IN (SELECT ID FROM Z));
Du kan ikke bruge Subquery Factoring/CTE med andet end SELECT-sætningen. Fra dokumentationen:
Du kan gøre dette:
DELETE FROM tbl WHERE tbl.id IN
(WITH X AS (), Y AS (), Z AS ()
SELECT id FROM TBL
WHERE TBL.ID IN (SELECT ID FROM Z));