CREATE MATERIALIZED VIEW with rowid : MATERIALIZED_VIEW « View « Oracle PL / SQL






CREATE MATERIALIZED VIEW with rowid

  


SQL> -- create demo table
SQL> create table emp(
  2    ID                 VARCHAR2(4 BYTE)         NOT NULL,
  3    fname         VARCHAR2(10 BYTE),
  4    lname          VARCHAR2(10 BYTE),
  5    Start_Date         DATE,
  6    End_Date           DATE,
  7    Salary             Number(8,2),
  8    City               VARCHAR2(10 BYTE),
  9    Description        VARCHAR2(15 BYTE)
 10  )
 11  /

Table created.

SQL> CREATE MATERIALIZED VIEW LOG ON emp
  2    WITH ROWID (fname)
  3    INCLUDING NEW VALUES;

Materialized view log created.

SQL>
SQL>
SQL> drop table emp;

Table dropped.

SQL>

   
    
  








Related examples in the same category

1.CREATE MATERIALIZED VIEW with TABLESPACE
2.create materialized view emp_dept build immediate refresh on demand enable query rewrite