创建物化视图_实例

CREATE MATERIALIZED VIEW  MV_DJ_NSRXX
TABLESPACE TS_NSPG_DAT
REFRESH COMPLETE ON DEMAND
ENABLE QUERY REWRITE
AS
SELECT NSRXX.NSR_KEY,
       NSRXX.NSBM,
       NSRXX.NSRDZXH,
       NSRXX.NSRMC,
       SWJG.SWJG_MC,
       SWRY.SWRY_MC,
       DJZCLX.DJZCLX_MC,
       HYLB.HY_MC,
       NSRXX.SCJYDH,
       NSRXX.SCJYDZ,
       NSRXX.ZGSWBM_DM,
       NSRXX.HY_DM,
       NSRXX.DJZCLX_DM
FROM   FT_DJ_NSRXX  NSRXX,
       DI_DM_SWJG   SWJG,
       DI_DM_SWRY   SWRY,
       DI_DM_DJZCLX DJZCLX,
       DI_DM_HY     HYLB
WHERE  NSRXX.ZGSWJG_DM = SWJG.SWJG_DM
AND    NSRXX.ZGY_DM = SWRY.SWRY_DM
AND    NSRXX.DJZCLX_DM = DJZCLX.DJZCLX_DM
AND    NSRXX.HY_DM = HYLB.HY_DM;

你可能感兴趣的:(物化视图)