SQL Commands

SQL (Structured Query Language) is a powerful language for interacting with relational databases. It allows us to create, manipulate, and retrieve data stored in tables.

SQL commands are grouped into different categories based on their functionality:

Data Definition Language (DDL):

Used to define the structure of the database, including creating, modifying, and deleting tables and other database objects.

Data Manipulation Language (DML):

Used to manage and modify data within the database. This includes inserting new data, updating existing data, and deleting unwanted data.

Data Control Language (DCL):

Used to control access privileges and permissions for users within the database. This ensures data security and controls who can access and modify data.

Transaction Control Language (TCL):

Manages database transactions, which are a series of database operations treated as a single unit. TCL ensures data consistency and integrity by controlling how changes are committed or rolled back.

Data Query Language (DQL):

Used to retrieve data from the database based on specific criteria. DQL is the foundation for querying relational databases and allows you to filter, sort, and aggregate data for analysis or reporting purposes.

Last updated