亚洲免费www97爱|草草aⅴ在线观看视频|伊伊综合网在线视频免费|在线日本道二区免费v

    您的位置:首頁>大學(xué)生活>

    教育資訊:with as 用法

    WITH AS短語,也叫做子查詢部分(subquery factoring),可以讓你做很多事情,定義一個SQL片斷,該SQL片斷會被整個SQL語句所用到。有的時候,是為了讓SQL語句的可讀性更高些,也有可能是在UNION ALL的不同部分,作為提供數(shù)據(jù)的部分。

    with as 用法

    with as 用法

    –針對一個別名

    with tmp as (select * from tb_name)

    –針對多個別名

    with

    tmp as (select * from tb_name),

    tmp2 as (select * from tb_name2),

    tmp3 as (select * from tb_name3),

    –相當(dāng)于建了個e暫時表

    with e as (select * from scott.emp e where e.empno=7499)

    select * from e;

    –相當(dāng)于建了e、d暫時表

    with

    e as (select * from scott.emp),

    d as (select * from scott.dept)

    select * from e, d where e.deptno = d.deptno;

    來源:高三網(wǎng)

    能發(fā)現(xiàn)自己知識上的薄弱環(huán)節(jié),在上課前補上這部分的知識,不使它成為聽課時的“絆腳石”。這樣,就會順利理解新知識,相信通過with as 用法這篇文章能幫到你,在和好朋友分享的時候,也歡迎感興趣小伙伴們一起來探討。

    免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!