没有合适的资源?快使用搜索试试~ 我知道了~
首页Oracle数据库SQL参考手册10.2版
Oracle数据库SQL参考手册10.2版
需积分: 3 1 下载量 104 浏览量
更新于2024-07-31
收藏 11.86MB PDF 举报
"Oracle® Database SQL Reference 10g Release 2 (10.2) B14200-02"
这篇文档是Oracle数据库SQL语句的详细参考资料,适用于学习和掌握ORACLE数据库的用户。它涵盖了10g Release 2版本的特性,这个版本发布于2005年12月。该文档由Diana Lorentz撰写,并有众多贡献者参与编纂,其中包括了对SQL语言和数据库管理有着深厚知识和经验的专业人士。
文档的核心内容可能包括以下几个方面:
1. **SQL基础**:介绍SQL语言的基本概念,如数据定义(DDL)语句,用于创建、修改和删除数据库对象,如表、视图、索引等;数据操纵(DML)语句,用于插入、更新和删除数据;以及数据查询(DQL)语句,用于检索数据库中的信息。
2. **查询优化**:详细解释如何编写高效的SQL查询,包括使用索引、联接操作、子查询、集合操作等,以及如何使用EXPLAIN PLAN分析查询执行计划,以优化查询性能。
3. **事务处理与并发控制**:阐述事务的概念,包括ACID属性(原子性、一致性、隔离性和持久性),以及Oracle提供的事务管理机制,如回滚、提交、保存点等。此外,还会涉及并发控制策略,如锁定机制和多版本并发控制(MVCC)。
4. **存储与分区**:介绍Oracle数据库的存储结构,如表空间、段、区和块,以及如何通过分区技术来提高大规模数据的管理和查询效率。
5. **安全性与权限管理**:涵盖用户管理、角色、权限、对象权限、系统权限的设置和管理,以及如何使用GRANT和REVOKE语句控制数据访问。
6. **触发器与存储过程**:详细讲解如何创建和使用触发器来自动化某些数据库操作,以及如何编写和执行存储过程,实现更复杂的业务逻辑。
7. **PL/SQL编程**:PL/SQL是Oracle的内置过程语言,文档会详细解释其语法、流程控制、异常处理,以及如何结合SQL语句进行程序设计。
8. **数据库连接与游标**:讨论如何通过不同的方式连接到Oracle数据库,如使用SQL*Plus或其他开发工具,以及如何使用游标进行迭代式数据处理。
9. **备份与恢复**:介绍Oracle的备份和恢复策略,包括物理备份、逻辑备份、RMAN(恢复管理器)的使用,以及如何进行数据恢复。
10. **性能监控与调优**:提供监控数据库性能的方法,如使用V$视图、AWR(自动工作负载 repository)报告,以及如何进行性能调优。
这份文档不仅适合初学者,也适用于有一定经验的DBA和开发者,他们可以从中获取到关于Oracle SQL的深入理解和实践指导。通过学习,读者能够熟练地掌握Oracle数据库的管理和开发技能,从而更好地利用这一强大数据库系统。
![](https://csdnimg.cn/release/download_crawler_static/3520503/bg10.jpg)
xvi
ALTER INDEX .................................................................................................................................... 10-64
ALTER INDEXTYPE .......................................................................................................................... 10-82
ALTER JAVA ........................................................................................................................................ 10-84
11 SQL Statements: ALTER MATERIALIZED VIEW to ALTER SYSTEM
ALTER MATERIALIZED VIEW ........................................................................................................ 11-2
ALTER MATERIALIZED VIEW LOG ............................................................................................ 11-15
ALTER OPERATOR ........................................................................................................................... 11-21
ALTER OUTLINE ............................................................................................................................... 11-24
ALTER PACKAGE ............................................................................................................................. 11-26
ALTER PROCEDURE ........................................................................................................................ 11-29
ALTER PROFILE ................................................................................................................................ 11-32
ALTER RESOURCE COST ............................................................................................................... 11-35
ALTER ROLE ....................................................................................................................................... 11-38
ALTER ROLLBACK SEGMENT ..................................................................................................... 11-40
ALTER SEQUENCE ........................................................................................................................... 11-43
ALTER SESSION ................................................................................................................................ 11-45
Initialization Parameters and ALTER SESSION....................................................................... 11-50
Session Parameters and ALTER SESSION ............................................................................... 11-53
ALTER SYSTEM ................................................................................................................................. 11-60
Initialization Parameters and ALTER SYSTEM........................................................................ 11-72
System Parameters and ALTER SYSTEM.................................................................................. 11-83
Shared Server Parameters .................................................................................................... 11-83
12 SQL Statements: ALTER TABLE to ALTER TABLESPACE
ALTER TABLE ....................................................................................................................................... 12-2
ALTER TABLESPACE ........................................................................................................................ 12-79
13 SQL Statements: ALTER TRIGGER to COMMIT
ALTER TRIGGER ................................................................................................................................. 13-2
ALTER TYPE ......................................................................................................................................... 13-5
ALTER USER ....................................................................................................................................... 13-18
ALTER VIEW ....................................................................................................................................... 13-25
ANALYZE ............................................................................................................................................ 13-27
ASSOCIATE STATISTICS ................................................................................................................ 13-38
AUDIT .................................................................................................................................................. 13-42
CALL ..................................................................................................................................................... 13-53
COMMENT ......................................................................................................................................... 13-57
COMMIT ............................................................................................................................................. 13-59
14 SQL Statements: CREATE CLUSTER to CREATE JAVA
CREATE CLUSTER .............................................................................................................................. 14-2
CREATE CONTEXT ............................................................................................................................. 14-9
CREATE CONTROLFILE ................................................................................................................. 14-12
CREATE DATABASE ......................................................................................................................... 14-18
CREATE DATABASE LINK ............................................................................................................. 14-31
![](https://csdnimg.cn/release/download_crawler_static/3520503/bg11.jpg)
xvii
CREATE DIMENSION ..................................................................................................................... 14-36
CREATE DIRECTORY ...................................................................................................................... 14-42
CREATE DISKGROUP ..................................................................................................................... 14-44
CREATE FUNCTION ........................................................................................................................ 14-48
CREATE INDEX ................................................................................................................................. 14-58
CREATE INDEXTYPE ....................................................................................................................... 14-81
CREATE JAVA ..................................................................................................................................... 14-84
15 SQL Statements: CREATE LIBRARY to CREATE SPFILE
CREATE LIBRARY ............................................................................................................................... 15-2
CREATE MATERIALIZED VIEW ..................................................................................................... 15-4
CREATE MATERIALIZED VIEW LOG ......................................................................................... 15-25
CREATE OPERATOR ........................................................................................................................ 15-32
CREATE OUTLINE ............................................................................................................................ 15-35
CREATE PACKAGE ........................................................................................................................... 15-39
CREATE PACKAGE BODY .............................................................................................................. 15-43
CREATE PFILE .................................................................................................................................... 15-47
CREATE PROCEDURE ..................................................................................................................... 15-49
CREATE PROFILE ............................................................................................................................. 15-54
CREATE RESTORE POINT ............................................................................................................. 15-60
CREATE ROLE .................................................................................................................................... 15-63
CREATE ROLLBACK SEGMENT .................................................................................................. 15-66
CREATE SCHEMA ............................................................................................................................. 15-69
CREATE SEQUENCE ........................................................................................................................ 15-71
CREATE SPFILE ................................................................................................................................. 15-75
16 SQL Statements: CREATE SYNONYM to CREATE TRIGGER
CREATE SYNONYM ........................................................................................................................... 16-2
CREATE TABLE .................................................................................................................................... 16-6
CREATE TABLESPACE ..................................................................................................................... 16-61
CREATE TRIGGER ............................................................................................................................ 16-75
17 SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT
CREATE TYPE ....................................................................................................................................... 17-3
CREATE TYPE BODY ........................................................................................................................ 17-21
CREATE USER .................................................................................................................................... 17-26
CREATE VIEW .................................................................................................................................... 17-32
DELETE ................................................................................................................................................ 17-43
DISASSOCIATE STATISTICS ........................................................................................................ 17-51
DROP CLUSTER ................................................................................................................................ 17-53
DROP CONTEXT ............................................................................................................................... 17-55
DROP DATABASE ............................................................................................................................. 17-56
DROP DATABASE LINK ................................................................................................................. 17-57
DROP DIMENSION .......................................................................................................................... 17-58
DROP DIRECTORY .......................................................................................................................... 17-59
DROP DISKGROUP ......................................................................................................................... 17-60
![](https://csdnimg.cn/release/download_crawler_static/3520503/bg12.jpg)
xviii
DROP FUNCTION ............................................................................................................................ 17-62
DROP INDEX....................................................................................................................................... 17-64
DROP INDEXTYPE ........................................................................................................................... 17-66
DROP JAVA ......................................................................................................................................... 17-67
DROP LIBRARY ................................................................................................................................. 17-68
DROP MATERIALIZED VIEW........................................................................................................ 17-69
DROP MATERIALIZED VIEW LOG ............................................................................................. 17-71
DROP OPERATOR ............................................................................................................................ 17-73
DROP OUTLINE ................................................................................................................................ 17-74
DROP PACKAGE ............................................................................................................................... 17-75
DROP PROCEDURE ......................................................................................................................... 17-77
DROP PROFILE .................................................................................................................................. 17-78
DROP RESTORE POINT ................................................................................................................. 17-79
DROP ROLE ........................................................................................................................................ 17-80
DROP ROLLBACK SEGMENT ...................................................................................................... 17-81
18
SQL Statements: DROP SEQUENCE to ROLLBACK
DROP SEQUENCE .............................................................................................................................. 18-2
DROP SYNONYM ............................................................................................................................... 18-3
DROP TABLE ........................................................................................................................................ 18-5
DROP TABLESPACE ........................................................................................................................... 18-9
DROP TRIGGER................................................................................................................................. 18-12
DROP TYPE ......................................................................................................................................... 18-13
DROP TYPE BODY ............................................................................................................................ 18-15
DROP USER ........................................................................................................................................ 18-16
DROP VIEW ........................................................................................................................................ 18-18
EXPLAIN PLAN .................................................................................................................................. 18-20
FLASHBACK DATABASE ................................................................................................................ 18-23
FLASHBACK TABLE ......................................................................................................................... 18-26
GRANT ................................................................................................................................................. 18-32
INSERT ................................................................................................................................................. 18-51
LOCK TABLE ...................................................................................................................................... 18-68
MERGE ................................................................................................................................................. 18-71
NOAUDIT ............................................................................................................................................ 18-76
PURGE .................................................................................................................................................. 18-80
RENAME .............................................................................................................................................. 18-82
REVOKE ............................................................................................................................................... 18-84
ROLLBACK ......................................................................................................................................... 18-92
19 SQL Statements: SAVEPOINT to UPDATE
SAVEPOINT .......................................................................................................................................... 19-2
SELECT ................................................................................................................................................... 19-4
SET CONSTRAINT[S] ...................................................................................................................... 19-48
SET ROLE ............................................................................................................................................ 19-50
SET TRANSACTION ........................................................................................................................ 19-52
TRUNCATE ......................................................................................................................................... 19-55
![](https://csdnimg.cn/release/download_crawler_static/3520503/bg13.jpg)
xix
UPDATE ............................................................................................................................................... 19-59
A How to Read Syntax Diagrams
Graphic Syntax Diagrams...................................................................................................................... A-1
Required Keywords and Parameters ............................................................................................ A-2
Optional Keywords and Parameters ............................................................................................. A-3
Syntax Loops...................................................................................................................................... A-3
Multipart Diagrams ......................................................................................................................... A-4
Database Objects .............................................................................................................................. A-4
B Oracle and Standard SQL
ANSI Standards ...................................................................................................................................... B-1
ISO Standards .......................................................................................................................................... B-2
Oracle Compliance To Core SQL:2003................................................................................................. B-3
Oracle Support for Optional Features of SQL/Foundation:2003.................................................... B-8
Oracle Compliance with SQL/CLI:2003 ............................................................................................ B-15
Oracle Compliance with SQL/PSM:2003 .......................................................................................... B-15
Oracle Compliance with SQL/MED:2003 ......................................................................................... B-15
Oracle Compliance with SQL/XML:2005.......................................................................................... B-16
Oracle Compliance with FIPS 127-2 ................................................................................................. B-22
Oracle Extensions to Standard SQL .................................................................................................. B-24
Character Set Support........................................................................................................................... B-24
C Oracle Regular Expression Support
Multilingual Regular Expression Syntax .......................................................................................... C-1
Regular Expression Operator Multilingual Enhancements............................................................ C-2
Perl-influenced Extensions in Oracle Regular Expressions ........................................................... C-3
D Oracle Database Reserved Words
E Examples
Using Extensible Indexing ................................................................................................................... E-1
Using XML in SQL Statements ............................................................................................................ E-8
Index
![](https://csdnimg.cn/release/download_crawler_static/3520503/bg14.jpg)
xx
剩余1427页未读,继续阅读
![](https://profile-avatar.csdnimg.cn/e7e563330502475d80cf3e9b258c5b7a_peters1235.jpg!1)
peters1235
- 粉丝: 11
- 资源: 8
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
最新资源
- 解决本地连接丢失无法上网的问题
- BIOS报警声音解析:故障原因与解决方法
- 广义均值移动跟踪算法在视频目标跟踪中的应用研究
- C++Builder快捷键大全:高效编程的秘密武器
- 网页制作入门:常用代码详解
- TX2440A开发板网络远程监控系统移植教程:易搭建与通用解决方案
- WebLogic10虚拟内存配置详解与优化技巧
- C#网络编程深度解析:Socket基础与应用
- 掌握Struts1:Java MVC轻量级框架详解
- 20个必备CSS代码段提升Web开发效率
- CSS样式大全:字体、文本、列表样式详解
- Proteus元件库大全:从基础到高级组件
- 74HC08芯片:高速CMOS四输入与门详细资料
- C#获取当前路径的多种方法详解
- 修复MySQL乱码问题:设置字符集为GB2312
- C语言的诞生与演进:从汇编到系统编程的革命
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)