Almindelige tabeludtryk er defineret i sammenhæng med en enkelt sætning:
WITH cte_name AS (
<cte definition>)
<statement that uses cte>;
Så du kan gøre noget som:
WITH CTE
AS
(
SELECT * FROM SOMETABLE
)
SELECT * FROM CTE;
eller
WITH CTE
AS
(
SELECT * FROM SOMETABLE
)
UPDATE CTE
SET somefield = somevalue
WHERE id = somekey;