0% found this document useful (0 votes)
1 views7 pages

SQL Commands

The document explains the essential types of SQL commands, categorized into five main groups: Data Definition Language (DDL) for managing database structure, Data Manipulation Language (DML) for manipulating data, Data Query Language (DQL) for querying data, Data Control Language (DCL) for managing access and security, and Transaction Control Language (TCL) for managing transactions and data integrity. Each category includes common commands and their functions. Understanding these commands is crucial for effectively utilizing SQL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views7 pages

SQL Commands

The document explains the essential types of SQL commands, categorized into five main groups: Data Definition Language (DDL) for managing database structure, Data Manipulation Language (DML) for manipulating data, Data Query Language (DQL) for querying data, Data Control Language (DCL) for managing access and security, and Transaction Control Language (TCL) for managing transactions and data integrity. Each category includes common commands and their functions. Understanding these commands is crucial for effectively utilizing SQL.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Mastering SQL:

Types of
Commands
Explained
💡 Unlock the power of SQL with
these essential commands! 🚀
1.Data Definition Language (DDL)
DDL deals with defining and managing the
database structure.
It includes commands to create, modify, and
delete database objects (tables, indexes,
views, etc.), but not data.
Common DDL commands:
CREATE: Used to create database objects
(e.g., tables, indexes, views).
DROP: Deletes objects from the database.
ALTER: Modifies the structure of the
database (e.g., adding or deleting columns).
TRUNCATE: Removes all records from a
table.
COMMENT: Adds comments to the data
dictionary.
2.Data Manipulation Language
(DML)
DML deals with manipulating data within the
database.
It includes commands to insert, update, and
delete data.
Only this commands have UNDO option.
Common DML commands:
INSERT: Adds new rows or record to a table.
UPDATE: Modifies existing data in a table.
DELETE: Removes data from a table.
3.Data Query Language (DQL)
DQL is used for querying data within schema
objects.
It includes the SELECT statement.
DQL retrieves data from the database and
imposes order upon it.
DQL is the most used SQL command.
4. Data Control Language (DCL)
DCL controls access and security.
It includes commands to grant or revoke
permissions.
It manages user permissions and security.
Common DCL commands:
GRANT: Provides specific privileges to users
or roles.
REVOKE: Removes specific privileges from
users or roles.
5. Transaction Control Language
(TCL)
TCL manages transactions and data integrity.
It includes commands to control the flow of
transactions.
It ensures data consistency and integrity.
Common TCL commands:
COMMIT: Saves changes to the database.
ROLLBACK: Undoes changes made during
the current transaction.
SAVEPOINT: Sets a point within a
transaction to which you can later roll back.
THANK
YOU

You might also like