TCL (Transactional Control Language) Commands.

TCL Commands: 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. Commit Command: Commit is […]

DCL (Data Control Language) Commands.

DCL Commands: DCL is abbreviation of 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 Grant Command: […]

DML (Data Manipulation Language) Commands.

DML Commands: DML is abbreviation of Data Manipulation Language. It is used to  insert, update and delete data in a database. INSERT –  Inserts data into a table UPDATE – Updates existing data into a table DELETE – Deletes all records from a table Insert Command The SQL Server Insert into statement is used to add new […]

DDL (Data Definition Language ) Commands.

DDL (Data Definition Language ) Commands: DDL Commands are used to create or destroy the objects in SQL Server. Create Alter Drop Create Command To create a table to use fallowing syntax:   Syntax: Create  table  <table-name> (column-1   datatype, column-2   datatype, column-3   datatype, ——————— ——————— Column-n  datatype, primary key(one or more columns)) Example: Create  table […]