Vanliga tabelluttryck definieras inom ramen för ett enda påstående:
WITH cte_name AS (
<cte definition>)
<statement that uses cte>;
Så du kan göra något 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;