What are the difference between DDL, DML and DCL commands
What are the difference between DDL, DML and DCL commands??DDLData Definition Language?(DDL) statem
What are the difference between DDL, DML and DCL commands?
?
DDL
Data Definition Language?(DDL) statements are used to define the database structure or schema. Some examples:
?
CREATE - to create objects in the databaseALTER - alters the structure of the databaseDROP - delete objects from the databaseTRUNCATE - remove all records from a table, including all spaces allocated for the records are removedCOMMENT - add comments to the data dictionaryRENAME - rename an object?
DML
Data Manipulation Language?(DML) statements are used for managing data within schema objects. Some examples:
?
SELECT - retrieve data from the a databaseINSERT - insert data into a tableUPDATE - updates existing data within a tableDELETE - deletes all records from a table, the space for the records remainMERGE - UPSERT operation (insert or update)CALL - call a PL/SQL or Java subprogramEXPLAIN PLAN - explain access path to dataLOCK TABLE - control concurrency?
DCL
Data Control Language?(DCL) statements. Some examples:
?
GRANT - gives user's access privileges to databaseREVOKE - withdraw access privileges given with the GRANT command?
TCL
Transaction Control?(TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
?
COMMIT - save work doneSAVEPOINT - identify a point in a transaction to which you can later roll backROLLBACK - restore database to original since the last COMMITSET TRANSACTION - Change transaction options like isolation level and what rollback segment to usesee :?http://www.orafaq.com/faq/what_are_the_difference_between_ddl_dml_and_dcl_commands