oracle sql常见问题集
-------------
1、DDL, DML和DCL 的不同
-------------
(1)DDL is Data Definition Language statements. Some examples:
CREATE,
ALTER,
DROP,
RUNCATE (emove all records from a table, including all spaces allocated for the records are removed),
COMMENT(dd comments to the data dictionary ),
GRANT,
EVOKE(ithdraw access privileges given with the GRANT command )
(2)DML is Data Manipulation Language statements. Some examples:
SELECT,
INSERT,
UPDATE,
DELETE(deletes all records from a table, the space for the records remain),
CALL(call a PL/SQL or Java subprogram),
EXPLAIN PLAN (explain access path to data ),
LOCK TABLE (control concurrency )
(3)DCL is Data Control Language statements. Some examples:
COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can later roll back
ROLLBACK - restore database to original since the last COMMIT
SET TRANSACTION - Change transaction options like what rollback segment to use