DBMS notes
DBMS notes
Commands
Structured Query Language (SQL) as we all know is the database
language by the use of which we can perform certain operations on
the existing database and also, we can use this language to create a
database. SQL uses certain commands like Create, Drop, Insert, etc.
to carry out the required tasks.
These SQL commands are mainly categorized into four categories
as:
Examples of DML:
INSERT – is used to insert data into a table.
UPDATE – is used to update existing data within a table.
DELETE – is used to delete records from a database table.
4.DCL(Data Control Language): DCL includes commands such as
GRANT and REVOKE which mainly deal with the rights, permissions
and other controls of the database system.
Examples of DCL commands:
GRANT-gives users access privileges to the database.
REVOKE-withdraw user’s access privileges given by using
the GRANT command.
TCL(transaction Control Language): TCL commands deal with
the transaction within the database.
Examples of TCL commands:
COMMIT– commits a Transaction.
ROLLBACK– rollbacks a transaction in case of any error
occurs.
SAVEPOINT–sets a savepoint within a transaction.
SET TRANSACTION–specify characteristics for the
transaction.