Sunday, October 21, 2018

Different types of Sql Command

Different types of Sql Command:

1. DML (Data Manipulation language)
 *Select
 *Insert
 *Update
 *Delete

2. DDL (Data definition language)
It is used to create and modify the structure of database objects in database.

*Create
*Alter
*Drop
*Truncate

3.Data Control Language.  It is used to create roles,
 permissions, and referential integrity as well it is used to control access to database by securing it.

 *GRANT – Gives user’s access privileges to database
 *REVOKE – Withdraws user’s access privileges to database given with the GRANT command

4. TCL(Transaction control language)

TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database.

COMMIT – Saves work done in transactions
ROLLBACK – Restores database to original state since the last COMMIT command in transactions
SAVE TRANSACTION – Sets a savepoint within a transaction

No comments:

Post a Comment

How to use SQL pagination using LIMIT and OFFSET

  How to extract just a portion of a larger result set from a SQL SELECT. LIMIT n is an alternative syntax to the FETCH FIRST n ROWS ONLY. T...