Chinaunix首页 | 论坛 | 博客
  • 博客访问: 926322
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-07-07 23:07:39

■VIEW
 Syntax:
    ・CREATE [OR REPLACE] [FORCE | NOFORCE] VIEW
[schema.]viewname [(alias [,alias]…)]
AS subquery
[WITH CHECK OPTION [CONSTRAINT constraintname]]
[WITH READ ONLY [CONSTRAINT constraintname]] ;
      ・DROP VIEW [schema.]viewname ;
■SEQUENCE
 Syntax:
    ・CREATE SEQUENCE [schema.]sequencename
[INCREMENT BY number] [START WITH number] [MAXVALUE number | NOMAXVALUE] [MINVALUE number | NOMINVALUE] [CYCLE | NOCYCLE] [CACHE number | NOCACHE] [ORDER | NOORDER] ;
    ・ALTER SEQUENCE sequencename
[INCREMENT BY number]
[START WITH number]
[MAXVALUE number | NOMAXVALUE]
[MINVALUE number | NOMINVALUE]
[CYCLE | NOCYCLE]
[CACHE number | NOCACHE]
[ORDER | NOORDER] ;
■INDEX
 Types of Index:B*Tree,Bitmap...
■SYNONYMS
 Syntax:
   CREATE [PUBLIC] SYNONYM synonym FOR object ;
   DROP [PUBLIC] SYNONYM synonym ;
     ・ALTER SYNONYM synonym COMPILE;
Private synonyms are schema objects. Either they must be in your own schema, or they must be qualified with the schema name. Public synonyms exist independently of a schema. A public synonym can be referred to by any user to whom permission has been granted to see it without the need to qualify it with a schema name. Private synonyms must be a unique name within their schema(a namespace(table,views,sequence,private synonym)). Public synonyms can have the same name as schema objects. When executing statements that address objects without a schema qualifier, Oracle will first look for the object in the local schema, and only if it cannot be found will it look for a public synonym. Thus, in example, if the user happened to own a table called EMP it would be this that he would see—not the table pointed to by the public synonym.
Tips:The “public” in “public synonym” means that it is not a schema
object and cannot therefore be prefixed with a schema name. It does not mean that everyone has permissions against it.

To create a private synonym in your own schema, you must have the CREATE SYNONYM system privilege.
To create a private synonym in another user's schema, you must have the CREATE ANY SYNONYM system privilege.
To create a PUBLIC synonym, you must have the CREATE PUBLIC SYNONYM system privilege.

阅读(950) | 评论(0) | 转发(0) |
0

上一篇:DDL to Create and Manage Tables

下一篇:T1_Select

给主人留下些什么吧!~~