---
title: "物化视图 语法"
author: "c_c"
date: "2010-07-19T20:47:48Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2010-07-19T20:51:57Z"
id: 716392
url: "https://waddy.iteye.com/blog/716392"
---

创建物化视图：

```
 create materialized view MV_except_pattern_orders
　 as
    select * from v_except_pattern_orders
```

删除物化视图：

 

 

```
drop materialized view MV_except_pattern_orders
```

 

```
drop materialized view MV_except_pattern_orders
```

 

 

 

更新物化视图：

```
call DBMS_MVIEW.REFRESH('MV_EXCEPT_PATTERN_ORDERS','C');
```

  

 

创建自动更新的物化视图：

```
 create materialized view MV_except_pattern_orders
　　refresh Complete on demand
      start with to_date('2010-01-01 13:20:51','YYYY-MM-DD HH24:MI:SS') next sysdate+1/(24*60)
　 as
    select * from v_except_pattern_orders
```