易截截图软件、单文件、免安装、纯绿色、仅160KB

ORACLE数据库对象——同义词、序列、视图

ORACLE数据库对象
——同义词、序列、视图
同义词:同义词是现有对象的别名
简化SQL语句
隐藏对象的名称和所有者
提供对对象的公共访问
 
同义词分为私有同义词和公有同义词
私有同义词只能在其模式内访问,且不能与当前模式的对象同名。
公有同义词可被所有的数据库用户访问。
 
以 SYS 用户登录
SQL> CONNECT SYS/SYS AS SYSDBA;
Connected to Oracle9i Enterprise Edition Release 9.2.0.1.0
Connected as SYS
 
创建私有同义词
SQL> CREATE SYNONYM synemp FOR SCOTT.emp;
 
Synonym created
 
SQL> select * from synemp;
 
EMPNO ENAME      JOB         MGR HIREDATE          SAL      COMM DEPTNO
----- ---------- --------- ----- ----------- --------- --------- ------
 7369 SMITH      CLERK      7902 1980-12-17     800.00               20
 7499 ALLEN      SALESMAN   7698 1981-2-20     1600.00    300.00     30
 7521 WARD       SALESMAN   7698 1981-2-22     1250.00    500.00     30
 7566 JONES      MANAGER    7839 1981-4-2      2975.00               20
 7654 MARTIN     SALESMAN   7698 1981-9-28     1250.00   1400.00     30
 7698 BLAKE      MANAGER    7839 1981-5-1      2850.00               30
 7782


相关文档:

oracle 表空间操作详解

  1
  2
  3
作者:   来源:    更新日期:2006-01-04 
  5
  6
 
  7
建立表空间
  8
  9
CREATE TABLESPACE data01
 10
DATAFILE '/oracle/oradata/d ......

Oracle取前N位SQL

      也许对SQL Server来说,取前N位的数据是很简单的事情,一条TOP语句就搞定了.
      在Oracle中我们往往会感觉到头疼,平日里也常会用到,主要是使用partition by.
语法如下:
select emp_card_no,work_date,read_card_date,count(rownum) as cnt
from hra_read_car ......

Two papers on Oracle 11g Security

Hey all,
Since there seems to be a fair bit of disinformation, and utter nonsense,
floating around since my talk at the Black Hat Federal security conference
the other day, I have decided to publish the following papers.
http://www.databasesecurity.com/HackingAurora.pdf
http://www.databasesec ......

ORACLE体系结构


一、             内存结构
共享池:分为库高速缓存和字典高速缓冲区
库高速缓存,用于存储经过语法分析并且正确的SQL语句,并随时准备执行。
字典高速缓冲区,存储登陆到ORACLE的用户名,及这些用户有哪些数据库对象以及这些数据库对象的位置。
数据缓 ......

ORACLE过程、函数

过程、函数
 
 
 
create or replace procedure p1
is
  empname emp.ename%type;
begin
  select ename into empname from emp where empno=7788;
  dbms_output.put_line(empname);
end;
 
SQL> ed
SQL> /
 
Procedure created
 
SQL> exec p1; ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号