CTE(With As)
WITH tabdate(dt) AS ( SELECT 1 FROM dual UNION ALL SELECT dt+1 FROM tabdate WHERE dt < 10 ) SELECT * FROM TabDate ;
一、With Table(字段) as (。。。)和后面的Select * from Table是一个整体,不允许在select前增加分号;
二、更新: Update table Set A with tablleB as () select * from tablellB 新增:Insert Into A(a,b,c) with TT(aa,bb,cc) as (...)select aa,bb,cc from TT;