Ekspresi tabel umum didefinisikan dalam konteks satu pernyataan:
WITH cte_name AS (
<cte definition>)
<statement that uses cte>;
Jadi, Anda dapat melakukan sesuatu seperti:
WITH CTE
AS
(
SELECT * FROM SOMETABLE
)
SELECT * FROM CTE;
atau
WITH CTE
AS
(
SELECT * FROM SOMETABLE
)
UPDATE CTE
SET somefield = somevalue
WHERE id = somekey;