Types of SQL statements in Oracle

DDL : Data Definition Language

1.CREATE – to create objects in the database
2.ALTER – alters the structure of the database
3.DROP – delete objects from the database
4.TRUNCATE – remove all records from a table, including all spaces allocated for the records are removed
5.COMMENT – add comments to the data dictionary
6.RENAME – rename an object
 
DML : Data Manipulation Language

1.SELECT – retrieve data from the a database
2.INSERT – insert data into a table
3.UPDATE – updates existing data within a table
4.DELETE – deletes all records from a table, the space for the records remain
5.MERGE – UPSERT operation (insert or update)
 
DCL: Data Control Language

1.GRANT – gives user’s access privileges to database
2.REVOKE – withdraw access privileges given with the GRANT command
 
TCL: Transaction Control Language

1.COMMIT – save work done
2.SAVEPOINT – identify a point in a transaction to which you can later roll back
3.ROLLBACK – restore database to original since the last COMMIT
4.SET TRANSACTION – Change transaction options like isolation level and what rollback segment to use

© 2015, https:. All rights reserved. On republishing this post, you must provide link to original post

Leave a Reply.. code can be added in <code> </code> tags