Oracle 建立臨時VIEW
在Oracle SQL執行時可以使用下列SQL來建立和使用VIEW, 在同一執行Session結束時就消失了。
With [table] AS ( select ..... from XXX )
SELECT * FROM [table]
sample code
※ 這個寫法聽說效能很差
With [table] AS ( select ..... from XXX )
SELECT * FROM [table]
sample code
WITH t_bom AS ( SELECT * from bmb_file WHERE bmb01 LIKE 'E80015%' ), t_ima AS ( SELECT ima01, ima02, ima021, ima140, imaacti FROM ima_file WHERE ima01 LIKE 'E80015%' ) SELECT * FROM t_bom, t_ima WHERE bmb01=ima01 ;
※ 這個寫法聽說效能很差
留言
張貼留言