#SQL语句

YashanDB定义了符合ANSI SQL标准的Structured Query Language(SQL)语句,可以将这些语句进行如下的通用分类:

# DDL(Data Definition Language)

数据定义语言,用于操作数据库中的对象和对象属性,这种对象还包括数据库本身。YashanDB提供如下DDL语句:

ALTER DATABASE

ALTER DATABASE LINK

ALTER FUNCTION

ALTER INDEX

ALTER PACKAGE

ALTER PROCEDURE

ALTER PROFILE

ALTER SEQUENCE

ALTER SESSION

ALTER SYSTEM

ALTER TABLE

ALTER TABLESPACE

ALTER TABLESPACE SET

ALTER TRIGGER

ALTER TYPE

ALTER USER

ALTER MATERIALIZED VIEW

BACKUP DATABASE

BACKUP ARCHIVELOG

BUILD DATABASE

COMMENT

CREATE ACCESS CONSTRAINT

CREATE DATABASE

CREATE DATABASE LINK

CREATE FUNCTION

CREATE INDEX

CREATE LIBRARY

CREATE MATERIALIZED VIEW

CREATE PACKAGE

CREATE PROCEDURE

CREATE PROFILE

CREATE ROLE

CREATE SEQUENCE

CREATE SYNONYM

CREATE TABLE

CREATE TABLE AS

CREATE TABLESPACE

CREATE TABLESPACE SET

CREATE TRIGGER

CREATE TYPE BODY

CREATE TYPE

CREATE USER

CREATE VIEW

CREATE DIRECTORY

DROP ACCESS CONSTRAINT

DROP DATABASE

DROP DATABASE LINK

DROP FUNCTION

DROP INDEX

DROP LIBRARY

DROP MATERIALIZED VIEW

DROP PACKAGE

DROP PROCEDURE

DROP PROFILE

DROP ROLE

DROP SEQUENCE

DROP SYNONYM

DROP TABLE

DROP TABLESPACE

DROP TABLESPACE SET

DROP TRIGGER

DROP TYPE BODY

DROP TYPE

DROP USER

DROP VIEW

DROP DIRECTORY

RECOVER DATABASE

RESTORE DATABASE

RESTORE ARCHIVELOG

SHUTDOWN

TRUNCATE TABLE

TRANSPORT

# DML(Data Manipulation Language)

数据操控语言,用于操作数据库中对象包含的数据,即记录。YashanDB提供如下DML语句:

SELECT

INSERT

UPDATE

DELETE

MERGE

# DCL(Data Control Language)

数据控制语言,用于操作数据库中对象的权限,和对事务的控制。YashanDB提供如下DCL语句:

COMMIT

GRANT

RELEASE SAVEPOINT

REVOKE

ROLLBACK

SAVEPOINT

SET TRANSACTION

# 其他功能性SQL

# 标准和加强功能

CALL/EXEC

FLASHBACK

LOAD DATA

LOCK TABLE

PURGE

SHUTDOWN

# 审计相关

ALTER AUDIT POLICY

AUDIT POLICY

CREATE AUDIT POLICY

DROP AUDIT POLICY

NOAUDIT POLICY

# 性能相关

ALTER OUTLINE

ANALYZE DATABASE

ANALYZE SCHEMA

ANALYZE TABLE

CREATE OUTLINE

CREATE SQLMAP

DROP OUTLINE

DROP SQLMAP

EXPLAIN

SET AUTOTRACE