Thursday 20 February 2014

SQL command Groups

Leave a Comment

Data Query Language (DQL) statement used querying database
SELECT ‐ used to retrieve the data present in the database


Data Definition Language (DDL) statements are used to define the database
structure or schema.
CREATE ‐ to create objects in the database
ALTER ‐ alters the structure of the database
DROP ‐ delete objects from the database
TRUNCATE ‐ remove all records from a table permanently
COMMENT ‐ add comments to the data dictionary
RENAME ‐ rename an object


Data Manipulation Language (DML) statements are used for managing data
within schema objects.
INSERT ‐ insert data into a table
UPDATE ‐ updates existing data within a table
DELETE ‐ deletes unwanted/all records from a table
MERGE ‐ UPSERT operation (insert or update)


Data Control Language (DCL) statements are used for granting and denying access
privileges to other user
GRANT ‐ gives user's access privileges to database
REVOKE ‐ withdraw access privileges given with the GRANT command


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 done
ROLLBACK ‐ restore database to original since the last COMMIT
SAVEPOINT ‐ identify a point in a transaction to which you can later roll back

Read More...