[go: up one dir, main page]

0% found this document useful (0 votes)
10 views2 pages

Types of SQL Commands

The document outlines the different types of SQL commands, categorized into five main groups: DDL for defining database structures, DML for manipulating data, DCL for managing permissions, TCL for handling transactions, and DQL for querying data. Each category includes specific commands such as CREATE, SELECT, GRANT, and COMMIT. This classification helps in understanding the various functionalities provided by SQL.

Uploaded by

pkbharath922
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)
10 views2 pages

Types of SQL Commands

The document outlines the different types of SQL commands, categorized into five main groups: DDL for defining database structures, DML for manipulating data, DCL for managing permissions, TCL for handling transactions, and DQL for querying data. Each category includes specific commands such as CREATE, SELECT, GRANT, and COMMIT. This classification helps in understanding the various functionalities provided by SQL.

Uploaded by

pkbharath922
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/ 2

Types of SQL Commands

1. DDL (Data Definition Language)

These commands define the structure of the database.

- CREATE: Creates new tables or databases.

- ALTER: Modifies existing database structures.

- DROP: Deletes objects from the database.

- TRUNCATE: Removes all records from a table.

- RENAME: Renames an object in the database.

2. DML (Data Manipulation Language)

These commands are used to manipulate data.

- SELECT: Retrieves data from the database.

- INSERT: Adds new data to a table.

- UPDATE: Modifies existing data.

- DELETE: Removes data from a table.

3. DCL (Data Control Language)

These commands deal with permissions.

- GRANT: Provides user access privileges.

- REVOKE: Withdraws user access privileges.

4. TCL (Transaction Control Language)

These commands handle transactions.

- COMMIT: Saves the work done.

- ROLLBACK: Restores the database to the last commit.

- SAVEPOINT: Sets a point to rollback to.

- SET TRANSACTION: Defines properties of a transaction.

5. DQL (Data Query Language)

Used to query the database.


Types of SQL Commands

- SELECT: Retrieves data; often considered as DQL.

You might also like