Data Manipulation Language Statements
Data Definition Language Statements
Transaction Control Statements
Session Control Statements
System Control Statements
Embedded SQL Statements
[@more@]Data manipulation language (DML) statements query or manipulate data in existing schema objects. They enable you to:
SELECT); fetches can be scrollable (see "Scrollable Cursors") INSERT) UPDATE) MERGE) DELETE) EXPLAIN PLAN) LOCK TABLE) DML statements are the most frequently used SQL statements. Some examples of DML statements are:
SELECT last_name, manager_id, commission_pct + salary FROM employees;
INSERT INTO employees VALUES
(1234, 'DAVIS', 'SALESMAN', 7698, '14-FEB-1988', 1600, 500, 30);
DELETE FROM employees WHERE last_name IN ('WARD','JONES');
Data definition language (DDL) statements define, alter the structure of, and drop schema objects. DDL statements enable you to:
CREATE, ALTER, DROP) RENAME) TRUNCATE) GRANT, REVOKE) AUDIT, NOAUDIT) COMMENT) DDL statements implicitly commit the preceding and start a new transaction. Some examples of DDL statements are:
CREATE TABLE plants
(COMMON_NAME VARCHAR2 (15), LATIN_NAME VARCHAR2 (40));
DROP TABLE plants;
GRANT SELECT ON employees TO scott;
REVOKE DELETE ON employees FROM scott; Transaction control statements manage the changes made by DML statements and group DML statements into transactions. They enable you to:
COMMIT) ROLLBACK) SAVEPOINT) SET TRANSACTION) Session control statements manage the properties of a particular user's session. For example, they enable you to:
ALTER SESSION) SET ROLE) System control statements change the properties of the Oracle server instance. The only system control statement is ALTER SYSTEM. It enables you to change settings (such as the minimum number of shared servers), kill a session, and perform other tasks.
Embedded SQL statements incorporate DDL, DML, and transaction control statements within a procedural language program. They are used with the Oracle precompilers. Embedded SQL statements enable you to:
DECLARE CURSOR, OPEN, CLOSE) DECLARE DATABASE, CONNECT) DECLARE STATEMENT) DESCRIBE) WHENEVER) PREPARE, EXECUTE, EXECUTE IMMEDIATE) FETCH) Oracle provides extensions to the standard SQL database language with integrity enhancement. The Federal Information Processing Standard for SQL (FIPS 127-2) requires vendors to supply a method for identifying SQL statements that use such extensions. You can identify or flag Oracle extensions in interactive SQL, the Oracle precompilers, or SQL*Module by using the FIPS flagger.
If you are concerned with the portability of your applications to other implementations of SQL, use the FIPS flagger.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7988176/viewspace-975991/ ,如需转载,请注明出处,否则将追究法律责任。