Pacific-Design.com

    
Home Index

1. SQL Language

2. 05 WITH Statement

SQL Language / 05 WITH Statement /

SQL - WITH Statement

WITH
  cte1 AS (SELECT a, b FROM table1),
  cte2 AS (SELECT c, d FROM table2)

SELECT b, d 
FROM cte1 JOIN cte2
WHERE cte1.a = cte2.c;

References