The short answer
= Common Table Expression.
WITH high_salary AS (
SELECT *
FROM employees
WHERE salary > 100000
)
SELECT *
FROM high_salary;It makes complex SQL easier to read and can also support recursive queries.
Free. Runs in your browser, no install.
SQL · Keys, Schema & CTEs
What is a CTE?
The short answer
= Common Table Expression.
WITH high_salary AS (
SELECT *
FROM employees
WHERE salary > 100000
)
SELECT *
FROM high_salary;It makes complex SQL easier to read and can also support recursive queries.
Lock it in with a real drill
You remember an answer longer once you have used it. Try a hands-on problem on this concept.