What are the differences between DDL, DML and DCL in SQL | developerIndian
#ddl and dml commands #dcl command #dcl in sql #sql_dml_ddl_tcl_dcl
CREATE : to create objects in database ALTER : alters the structure of database DROP : delete objects from database RENAME : rename an objects Example of creation of table Data Definition Language
create table Developer (location char(20), languae char(15), Mark numeric(12,2));
SELECT: retrieve data from the database INSERT: insert data into a table UPDATE: update existing data within a table DELETE: deletes all records from a table, space for the records remain Example of creation of table Data Manipulation Language
select location from developer where developer.location= 'india';
COMMIT: Commit command in sql is used to permanently save any transaction into the database . ROLLBACK: Rollback command restores the database to last committed state. It is also used with savepoint command to jump to a savepoint in a transaction. SAVEPOINT: Savepoint command in sql is used to temporarily save a transaction so that you can rollback to that point whenever necessary. Example of creation of table Data Manipulation Language mysql> COMMIT; turn off commit mysql> SET autocommit = 0;