CTE = 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.
SQL · Keys, Schema & CTEs
What is a CTE?
CTE = 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.
🎯 Put this concept into practice
Solidify this answer with real hands-on interview drills in the browser studio.