#SQL语句

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

# DDL(Data Definition Language)

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

ALTER DATABASE

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

BACKUP DATABASE

BUILD DATABASE

COMMENT

CREATE ACCESS CONSTRAINT

CREATE DATABASE

CREATE FUNCTION

CREATE INDEX

CREATE LIBRARY

CREATE PACKAGE

CREATE PROCEDURE

CREATE PROFILE

CREATE ROLE

CREATE SEQUENCE

CREATE SYNONYM

CREATE TABLE

CREATE TABLE AS

CRETAE TABLESPACE

CREATE TRIGGER

CREATE TYPE BODY

CREATE TYPE

CREATE USER

CREATE VIEW

DROP ACCESS CONSTRAINT

DROP DATABASE

DROP FUNCTION

DROP INDEX

DROP LIBRARY

DROP PACKAGE

DROP PROCEDURE

DROP PROFILE

DROP ROLE

DROP SEQUENCE

DROP SYNONYM

DROP TABLE

DROP TABLESPACE

DROP TRIGGER

DROP TYPE BODY

DROP TYPE

DROP USER

DROP VIEW

RECOVER DATABASE

RESTORE DATABASE

SHUTDOWN

TRUNCATE TABLE

# 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

PURGE

SHUTDOWN

# 审计相关

ALTER AUDIT POLICY

AUDIT POLICY

CREATE AUDIT POLICY

DROP AUDIT POLICY

NOAUDIT POLICY

# 性能相关

ALTER OUTLINE

ANALYZE TABLE

CREATE OUTLINE

CREATE SQLMAP

DROP OUTLINE

DROP SQLMAP

EXPLAIN

SET AUTOTRACE