0% found this document useful (0 votes)
4 views

SQL Command Cheat Sheet

This document is a SQL Command Cheat Sheet that categorizes SQL commands into five groups: DDL, DML, DCL, TCL, and DQL. It provides a brief description of each command, including operations for creating, modifying, and deleting database objects, as well as managing data and user privileges. The cheat sheet serves as a quick reference for essential SQL commands and their functions.

Uploaded by

Jebisha J
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)
4 views

SQL Command Cheat Sheet

This document is a SQL Command Cheat Sheet that categorizes SQL commands into five groups: DDL, DML, DCL, TCL, and DQL. It provides a brief description of each command, including operations for creating, modifying, and deleting database objects, as well as managing data and user privileges. The cheat sheet serves as a quick reference for essential SQL commands and their functions.

Uploaded by

Jebisha J
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/ 1

SQL Command Cheat Sheet

1. DDL (Data Definition Language)

- CREATE - Creates a new table, view, or other object.

- ALTER - Modifies an existing object.

- DROP - Deletes an object like a table or view.

- TRUNCATE - Removes all records from a table.

- RENAME - Renames an object.

- COMMENT - Adds comments to the schema.

2. DML (Data Manipulation Language)

- SELECT - Retrieves data.

- INSERT - Adds new data.

- UPDATE - Modifies existing data.

- DELETE - Removes data.

- MERGE - Merges data from one table into another.

3. DCL (Data Control Language)

- GRANT - Provides privileges to users.

- REVOKE - Removes privileges from users.

4. TCL (Transaction Control Language)

- COMMIT - Saves transaction changes.

- ROLLBACK - Reverses changes in a transaction.

- SAVEPOINT - Sets a rollback point.

- SET TRANSACTION - Sets transaction properties.

5. DQL (Data Query Language)

- SELECT - Used for querying data (often considered separately from DML).

You might also like