我正在尝试创建类似的东西,但最终会出错。不确定这是否是正确的方法。
WITH SECONDMAIN AS
(
WITH MAIN AS
(
SELECT
....
)
SELECT
*
FROM MAIN M
JOIN ....
)
SELECT * FROM SECONDMAIN SM;
答案 0 :(得分:3)
语法为-
WITH MAIN AS
(
SELECT
....
),
SECONDMAIN AS
(
SELECT
*
FROM MAIN M
JOIN ....
)
SELECT * FROM SECONDMAIN SM;