Loading, please wait...

SQL Commands

Introduction To SQL Commands

 

Introduction:

In this article, you will learn, what the work of SQL commands in SQL Server is?

In this part of SQL, we discuss SQL commands, which are regularly used in SQL queries. These SQL commands source will define, what is the work of Select, Insert, Update, Delete, Alter, Drop and Where SQL commands.

 

These commands can be divided into the sets, based on their nature. These are mainly divided into three parts:

 

 

 

 

DDL - Data Definition Language:

It is a computer language, which is used to create, alter and delete the design of the database object. DDL is also known as Data Description Language.

 

Command

Description

Create

Create a new table and view of a table.

Alter

Modifies a current database table.

Drop

Delete all the tables.

 

Create command is used to create a new table.

Alter command is used to modify the current data.

Drop command is used to delete all the tables in the database.

 

 

DML - Data Manipulation Language:

It is used to retrieve, store, modify, delete, insert and update the data in the database. Before retrieving or manipulating the data, we need to generate the database objects like a table.

 

Command

Description

Select

Select the records from one or more tables.

Insert

Used to insert the records.

Update

Modify the records.

Delete

Used to delete the records.

 

Select command is used to select the records in one or more tables.

Insert command is used to insert the data.

Update command is used to modify the data.

Delete command is used to delete the records.

 

 

DCL - Data Control Language:

This language includes two main commands Grant and Revoke. It is used to create license and quotation principle, as well. It is used to control contact to the database by securing it.

 

Command

Description

Grant

Provide an authority to the user.

Revoke

To take back.

 

Grant command gives the user an access authority to the database.

Revoke takes back the permissions from the user.

 

Summary:
Thus, we learned, how various operations can be performed, using SQL commands in SQL server.