没有合适的资源?快使用搜索试试~ 我知道了~
首页Oracle数据库SQL语言参考指南
"Oracle SQL Reference 是一份全面且深入的指南,涵盖了Oracle数据库11g Release 2 (11.2)版本的SQL语言使用。这份手册由Diana Lorentz和MaryBeth Roeser为主要作者,并有多位贡献者共同编写完成,旨在帮助用户理解和掌握Oracle SQL的各种功能和操作。"
在Oracle SQL Reference中,你可以找到关于以下几个关键知识点的详细信息:
1. **SQL基础**: 包括数据查询、数据插入、更新和删除(即SELECT, INSERT, UPDATE, DELETE语句)的基本语法和使用方法。这些是任何数据库操作的基础。
2. **数据类型**: Oracle支持多种数据类型,如NUMBER, VARCHAR2, DATE, TIMESTAMP等。了解这些数据类型以及它们的用法对于正确存储和处理数据至关重要。
3. **表的创建与管理**: 创建(CREATE TABLE)、修改(ALTER TABLE)和删除(DROP TABLE)数据库表的语法,以及如何定义字段、主键、外键、索引等。
4. **查询优化**: 使用SELECT语句进行复杂查询,包括联接(JOIN)、子查询、集合操作(UNION, INTERSECT, EXCEPT)。此外,还涵盖了如何使用EXPLAIN PLAN进行查询计划分析以优化性能。
5. **事务处理**: 了解如何开始(BEGIN)、提交(COMMIT)、回滚(ROLLBACK)事务,以及并发控制(锁定、行级锁、读一致性视图)的概念。
6. **存储过程和函数**: 如何定义、调用和管理自定义的PL/SQL存储过程和函数,以及游标、异常处理等高级PL/SQL特性。
7. **索引**: 创建和管理B树、位图、唯一性和非唯一性索引,以提高查询速度。
8. **视图**: 创建和使用视图,以提供虚拟表并实现数据的逻辑抽象。
9. **触发器**: 自动执行的程序单元,当满足特定事件(如INSERT, UPDATE或DELETE)时被触发。
10. **分区表**: 针对大数据量的高效管理技术,包括范围、列表、哈希和复合分区。
11. **游标和循环**: 在PL/SQL中使用游标进行迭代操作,以及在循环结构中的应用。
12. **安全性**: 用户权限管理,包括GRANT和REVOKE语句,以及角色的创建和使用。
13. **备份与恢复**: Oracle数据库的备份策略,如使用RMAN(恢复管理器)进行备份和恢复。
14. **性能监控**: 使用V$视图和动态性能视图来诊断和优化数据库性能。
15. **XML支持**: Oracle对XML数据类型的处理,包括存储、查询和转换XML文档。
16. **数据库链接**: 实现不同数据库实例间的通信和数据共享。
这份参考手册涵盖了Oracle SQL的广泛主题,对于数据库管理员、开发人员和运维人员来说,是不可或缺的参考资料。通过深入学习和实践,可以提升在Oracle数据库环境中进行数据管理和应用开发的能力。
xvi
Sorting Query Results ......................................................................................................................... 9-10
Joins ......................................................................................................................................................... 9-11
Join Conditions ............................................................................................................................... 9-11
Equijoins .......................................................................................................................................... 9-11
Self Joins .......................................................................................................................................... 9-12
Cartesian Products ......................................................................................................................... 9-12
Inner Joins ....................................................................................................................................... 9-12
Outer Joins ....................................................................................................................................... 9-12
Antijoins .......................................................................................................................................... 9-14
Semijoins .......................................................................................................................................... 9-14
Using Subqueries ................................................................................................................................. 9-14
Unnesting of Nested Subqueries ...................................................................................................... 9-15
Selecting from the DUAL Table ........................................................................................................ 9-16
Distributed Queries ............................................................................................................................. 9-16
10 SQL Statements: ALTER CLUSTER to ALTER JAVA
Types of SQL Statements .................................................................................................................... 10-1
Data Definition Language (DDL) Statements ............................................................................ 10-2
Data Manipulation Language (DML) Statements ..................................................................... 10-2
Transaction Control Statements ................................................................................................... 10-3
Session Control Statements ........................................................................................................... 10-3
System Control Statement ............................................................................................................. 10-3
Embedded SQL Statements .......................................................................................................... 10-3
How the SQL Statement Chapters are Organized ......................................................................... 10-4
ALTER CLUSTER ................................................................................................................................. 10-5
ALTER DATABASE ............................................................................................................................. 10-9
ALTER DATABASE LINK ................................................................................................................ 10-46
ALTER DIMENSION ........................................................................................................................ 10-48
ALTER DISKGROUP ........................................................................................................................ 10-51
ALTER FLASHBACK ARCHIVE .................................................................................................... 10-74
ALTER FUNCTION ........................................................................................................................... 10-77
ALTER INDEX .................................................................................................................................... 10-78
ALTER INDEXTYPE .......................................................................................................................... 10-97
ALTER JAVA ...................................................................................................................................... 10-100
11 SQL Statements: ALTER LIBRARY to ALTER SYSTEM
ALTER LIBRARY................................................................................................................................... 11-2
ALTER MATERIALIZED VIEW ........................................................................................................ 11-3
ALTER MATERIALIZED VIEW LOG ............................................................................................ 11-18
ALTER OPERATOR ........................................................................................................................... 11-25
ALTER OUTLINE ............................................................................................................................... 11-28
ALTER PACKAGE ............................................................................................................................. 11-30
ALTER PROCEDURE ........................................................................................................................ 11-31
ALTER PROFILE ................................................................................................................................ 11-32
ALTER RESOURCE COST ............................................................................................................... 11-35
ALTER ROLE ....................................................................................................................................... 11-38
ALTER ROLLBACK SEGMENT ..................................................................................................... 11-40
xvii
ALTER SEQUENCE ........................................................................................................................... 11-43
ALTER SESSION ................................................................................................................................ 11-45
Initialization Parameters and ALTER SESSION....................................................................... 11-50
Session Parameters and ALTER SESSION ............................................................................... 11-51
ALTER SYSTEM ................................................................................................................................. 11-58
12 SQL Statements: ALTER TABLE to ALTER TABLESPACE
ALTER TABLE ....................................................................................................................................... 12-2
ALTER TABLESPACE ........................................................................................................................ 12-91
13 SQL Statements: ALTER TRIGGER to COMMIT
ALTER TRIGGER ................................................................................................................................. 13-2
ALTER TYPE ......................................................................................................................................... 13-4
ALTER USER ......................................................................................................................................... 13-5
ALTER VIEW ....................................................................................................................................... 13-12
ANALYZE ............................................................................................................................................ 13-15
ASSOCIATE STATISTICS ................................................................................................................ 13-23
AUDIT .................................................................................................................................................. 13-27
CALL ..................................................................................................................................................... 13-40
COMMENT ......................................................................................................................................... 13-44
COMMIT ............................................................................................................................................. 13-47
14 SQL Statements: CREATE CLUSTER to CREATE JAVA
CREATE CLUSTER .............................................................................................................................. 14-2
CREATE CONTEXT ............................................................................................................................. 14-9
CREATE CONTROLFILE ................................................................................................................. 14-12
CREATE DATABASE ......................................................................................................................... 14-19
CREATE DATABASE LINK ............................................................................................................. 14-32
CREATE DIMENSION ..................................................................................................................... 14-37
CREATE DIRECTORY ...................................................................................................................... 14-42
CREATE DISKGROUP ..................................................................................................................... 14-44
CREATE EDITION ............................................................................................................................. 14-52
CREATE FLASHBACK ARCHIVE ................................................................................................. 14-56
CREATE FUNCTION ........................................................................................................................ 14-59
CREATE INDEX ................................................................................................................................. 14-61
CREATE INDEXTYPE ....................................................................................................................... 14-88
CREATE JAVA ..................................................................................................................................... 14-92
15 SQL Statements: CREATE LIBRARY to CREATE SPFILE
CREATE LIBRARY ............................................................................................................................... 15-2
CREATE MATERIALIZED VIEW ..................................................................................................... 15-4
CREATE MATERIALIZED VIEW LOG ......................................................................................... 15-27
CREATE OPERATOR ........................................................................................................................ 15-35
CREATE OUTLINE ............................................................................................................................ 15-38
CREATE PACKAGE ........................................................................................................................... 15-42
xviii
CREATE PACKAGE BODY .............................................................................................................. 15-44
CREATE PFILE .................................................................................................................................... 15-46
CREATE PROCEDURE ..................................................................................................................... 15-48
CREATE PROFILE ............................................................................................................................. 15-50
CREATE RESTORE POINT ............................................................................................................. 15-56
CREATE ROLE .................................................................................................................................... 15-59
CREATE ROLLBACK SEGMENT .................................................................................................. 15-62
CREATE SCHEMA ............................................................................................................................. 15-65
CREATE SEQUENCE ........................................................................................................................ 15-67
CREATE SPFILE ................................................................................................................................. 15-71
16 SQL Statements: CREATE SYNONYM to CREATE TRIGGER
CREATE SYNONYM ........................................................................................................................... 16-2
CREATE TABLE .................................................................................................................................... 16-6
CREATE TABLESPACE ..................................................................................................................... 16-82
CREATE TRIGGER ............................................................................................................................ 16-96
17 SQL Statements: CREATE TYPE to DROP ROLLBACK SEGMENT
CREATE TYPE ....................................................................................................................................... 17-3
CREATE TYPE BODY .......................................................................................................................... 17-5
CREATE USER ...................................................................................................................................... 17-7
CREATE VIEW .................................................................................................................................... 17-14
DELETE ................................................................................................................................................ 17-26
DISASSOCIATE STATISTICS ........................................................................................................ 17-34
DROP CLUSTER ................................................................................................................................ 17-36
DROP CONTEXT ............................................................................................................................... 17-38
DROP DATABASE ............................................................................................................................. 17-39
DROP DATABASE LINK ................................................................................................................. 17-40
DROP DIMENSION .......................................................................................................................... 17-41
DROP DIRECTORY .......................................................................................................................... 17-42
DROP DISKGROUP ......................................................................................................................... 17-43
DROP EDITION ................................................................................................................................. 17-45
DROP FLASHBACK ARCHIVE ..................................................................................................... 17-47
DROP FUNCTION ............................................................................................................................ 17-48
DROP INDEX....................................................................................................................................... 17-50
DROP INDEXTYPE ........................................................................................................................... 17-52
D R O P J AVA ......................................................................................................................................... 17-53
DROP LIBRARY ................................................................................................................................. 17-54
DROP MATERIALIZED VIEW........................................................................................................ 17-55
DROP MATERIALIZED VIEW LOG ............................................................................................. 17-57
DROP OPERATOR ............................................................................................................................ 17-59
DROP OUTLINE ................................................................................................................................ 17-60
DROP PACKAGE ............................................................................................................................... 17-62
DROP PROCEDURE ......................................................................................................................... 17-64
DROP PROFILE .................................................................................................................................. 17-65
DROP RESTORE POINT ................................................................................................................. 17-66
DROP ROLE ........................................................................................................................................
17-67
xix
DROP ROLLBACK SEGMENT ...................................................................................................... 17-68
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-24
FLASHBACK TABLE ......................................................................................................................... 18-27
GRANT ................................................................................................................................................. 18-33
INSERT ................................................................................................................................................. 18-54
LOCK TABLE ...................................................................................................................................... 18-72
MERGE ................................................................................................................................................. 18-75
NOAUDIT ............................................................................................................................................ 18-80
PURGE .................................................................................................................................................. 18-84
RENAME .............................................................................................................................................. 18-86
REVOKE ............................................................................................................................................... 18-88
ROLLBACK ......................................................................................................................................... 18-97
19 SQL Statements: SAVEPOINT to UPDATE
SAVEPOINT .......................................................................................................................................... 19-2
SELECT ................................................................................................................................................... 19-4
SET CONSTRAINT[S] ...................................................................................................................... 19-59
SET ROLE ............................................................................................................................................ 19-61
SET TRANSACTION ........................................................................................................................ 19-64
TRUNCATE CLUSTER ..................................................................................................................... 19-67
TRUNCATE TABLE ........................................................................................................................... 19-69
UPDATE ............................................................................................................................................... 19-73
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 Automatic and Manual Locking Mechanisms During SQL Operations
Automatic Locks in DML Operations ................................................................................................. B-1
xx
Automatic Locks in DDL Operations.................................................................................................. B-4
Exclusive DDL Locks........................................................................................................................ B-4
Share DDL Locks............................................................................................................................... B-5
Breakable Parse Locks ...................................................................................................................... B-5
Manual Data Locking ............................................................................................................................. B-5
C Oracle and Standard SQL
ANSI Standards ...................................................................................................................................... C-1
ISO Standards .......................................................................................................................................... C-2
Oracle Compliance To Core SQL:2008................................................................................................. C-3
Oracle Support for Optional Features of SQL/Foundation:2008.................................................... C-9
Oracle Compliance with SQL/CLI:2008 ............................................................................................ C-21
Oracle Compliance with SQL/PSM:2008 .......................................................................................... C-21
Oracle Compliance with SQL/MED:2008 ......................................................................................... C-21
Oracle Compliance with SQL/OLB:2008........................................................................................... C-21
Oracle Compliance with SQL/JRT:2008 ............................................................................................ C-21
Oracle Compliance with SQL/XML:2008.......................................................................................... C-21
Oracle Compliance with FIPS 127-2 ................................................................................................. C-26
Oracle Extensions to Standard SQL .................................................................................................. C-27
Oracle Compliance with Older Standards ....................................................................................... C-27
Character Set Support........................................................................................................................... C-27
D Oracle Regular Expression Support
Multilingual Regular Expression Syntax .......................................................................................... D-1
Regular Expression Operator Multilingual Enhancements............................................................ D-2
Perl-influenced Extensions in Oracle Regular Expressions ........................................................... D-3
E Oracle SQL Reserved Words and Keywords
Oracle SQL Reserved Words ................................................................................................................. E-1
Oracle SQL Keywords............................................................................................................................ E-3
F Extended Examples
Using Extensible Indexing ................................................................................................................... F-1
Using XML in SQL Statements ............................................................................................................ F-8
Index
剩余1629页未读,继续阅读
2012-01-30 上传
2010-05-29 上传
2008-09-09 上传
2008-06-19 上传
2011-08-15 上传
2009-11-17 上传
2012-07-25 上传
2011-03-14 上传
ty_111ty
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 正整数数组验证库:确保值符合正整数规则
- 系统移植工具集:镜像、工具链及其他必备软件包
- 掌握JavaScript加密技术:客户端加密核心要点
- AWS环境下Java应用的构建与优化指南
- Grav插件动态调整上传图像大小提高性能
- InversifyJS示例应用:演示OOP与依赖注入
- Laravel与Workerman构建PHP WebSocket即时通讯解决方案
- 前端开发利器:SPRjs快速粘合JavaScript文件脚本
- Windows平台RNNoise演示及编译方法说明
- GitHub Action实现站点自动化部署到网格环境
- Delphi实现磁盘容量检测与柱状图展示
- 亲测可用的简易微信抽奖小程序源码分享
- 如何利用JD抢单助手提升秒杀成功率
- 快速部署WordPress:使用Docker和generator-docker-wordpress
- 探索多功能计算器:日志记录与数据转换能力
- WearableSensing: 使用Java连接Zephyr Bioharness数据到服务器
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功