What is SQL?


SQL = sequel
As a database developer, we need to manage the database to store, access and modify data. SQL is the core language used to perform these operations on the data and used to manage the data in an RDBMS.

The SQL statements can be categorized as Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL) and Data Query Language (DQL).

Data Definition Language (DDL)

Data Definition Language (DDL) is used by to define the database, data types, structures and constraints on the data.
DDL Commands are:

  • CREATE – used to create a new database object , table
  • ALTER – used to modify the database objects
  • DROP – used to delete the objects

Data Manipulation Language (DML)

Data Manipulation Language (DML) is used to manipulate the data in the database object.
DML commands are:

  • INSERT – used to insert a new data record in table
  • UPDATE – used to modify an existing record in a table
  • DELETE – used to delete a record from a table

Data Control Language (DCL)

Data Control Language (DCL) is used to control the data access in the database.
DCL commands are:

  • GRANT – used to assign permissions to users to access a database object
  • REVOKE – used to deny permissions to users to access a database object

Data Query Language (DQL)

Data Query Language (DQL) is used to query data from the database object.
DQL commands are:

  • SELECT – used to select data from the database