「Oracle」WITH文を使うサンプル
書式
WITH 別名 AS (SELECT文)
使用例
WITH TTT AS (SELECT * FROM INFO_TBL) SELECT CFT.* FROM USER_TBL CFT INNER JOIN TTT KE ON CFT.UNO = KE.UNO INNER JOIN TTT KF ON CFT.UNO = KF.UNO ;
Coding Changes the World
書式
WITH 別名 AS (SELECT文)
使用例
WITH TTT AS (SELECT * FROM INFO_TBL) SELECT CFT.* FROM USER_TBL CFT INNER JOIN TTT KE ON CFT.UNO = KE.UNO INNER JOIN TTT KF ON CFT.UNO = KF.UNO ;