2010年6月2日
摘要: 同义词是在a用户下给b用户下的表、视图、序列号等建一个别名,a用户对该别名操作与b用户对该对象的操作一致。举例:create or replace synonym ALLACTIVE for PUBR.ALLACTIVE;create or replace synonym VW_SW2DDATA_GOODSCATALOG for PUBR.VW_SW2DDATA_GOODSCATALOG;crea... 阅读全文
posted @ 2010-06-02 21:42 Brad Miller 阅读(11200) 评论(0) 推荐(0)
摘要: 模式:create user 用户名 default tablespace 表空间名;举例:-- Create the user create user ACCOUNT identified by "" default tablespace ACCOUNTTS temporary tablespace TEMP profile DEFAULT;-- Grant/Revoke role privil... 阅读全文
posted @ 2010-06-02 21:39 Brad Miller 阅读(2354) 评论(0) 推荐(0)
摘要: 模式:create sequence 序列号名 minvalue 最小值maxvalue 最大值start with 目前值increment by 步长nocache;举例:-- Create sequence create sequence SEQ_ALLACTIVESEARCHINFOminvalue 1maxvalue 999999999999999999999999999start with 15increment by 1nocache;应用:select seq_allactivesearchinfo.nextval into l_searchid from dual;alter 阅读全文
posted @ 2010-06-02 21:28 Brad Miller 阅读(11878) 评论(0) 推荐(0)
摘要: 模式:create or replace view 视图名 as ...举例:create or replace view vw_rightpeople(rightpeopletypename, rightpeopletype, rightpeopleid, organizetypeno, parentorganizeno, idno, idtype, rightpeoplename, right... 阅读全文
posted @ 2010-06-02 21:22 Brad Miller 阅读(7859) 评论(0) 推荐(0)
摘要: oracle中表、主键、索引都有存贮数属性, tablespace TTTS pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited );索引它们都是被实实在在存在磁盘中。而外键、视图等都没有存贮属性,只是被记录在oracle的后台表中而已。-- Create tablec... 阅读全文
posted @ 2010-06-02 21:13 Brad Miller 阅读(2372) 评论(0) 推荐(0)
摘要: 模式:create or replace directory 目录名 as '目录地址';举例:create or replace directory MEDIA_DIR as 'd:\oracle\ora92\demo\schema\product_media\'; 注意:定义的目录名MEDIA_DIR必须全部使用大写,负责提示不认识这个路径(或目录无效)。 阅读全文
posted @ 2010-06-02 21:09 Brad Miller 阅读(563) 评论(0) 推荐(0)
摘要: 模式:CREATE OR REPLACE TYPE 类型名 as OBJECT (属性名 属性类型,...);举例:CREATE OR REPLACE TYPE BITS_IDX_BASE AS OBJECT ( NAME VARCHAR2(4000), FIELDS VARCHAR2(4000), CREATE_DATE VARCHAR2(4000), INCREMENT_DATE VARCHA... 阅读全文
posted @ 2010-06-02 20:59 Brad Miller 阅读(4620) 评论(0) 推荐(0)