Day1: SQL

SQL (Structured Query Language) is a standard language used to interact with databases.

It allows you to:
•Store data
•Retrieve data
•Update data
•Delete data
•Manage databases and table.

SQL is the language of databases.

Types of SQL Commands

SQL …


This content originally appeared on DEV Community and was authored by Aruna Arun

SQL (Structured Query Language) is a standard language used to interact with databases.

It allows you to:
•Store data
•Retrieve data
•Update data
•Delete data
•Manage databases and table.

SQL is the language of databases.

Types of SQL Commands

SQL is divided into different types based on their purpose:

1.DDL (Data Definition Language) – Defines the structure of the database.

Examples:
•CREATE → create a new table/database
•ALTER → modify an existing table
•DROP → delete a table/database
•TRUNCATE → delete all data in a table but keep the structure

2.DML (Data Manipulation Language)
– Deals with data inside tables.

Examples:
INSERT → add new records
UPDATE → modify existing records
DELETE → remove records

3.DQL (Data Query Language)
– Used to query (fetch) data.

Example:
SELECT → retrieve data from tables

4.DCL (Data Control Language)
– Manages permissions and access.

Examples:
GRANT → give access rights
REVOKE → remove access rights

5.TCL (Transaction Control Language)
– Manages transactions in the database.

Examples:
COMMIT → save changes
ROLLBACK → undo changes
SAVEPOINT → create a checkpoint

Simple way to remember:

DDL → Structure
DML → Data
DQL → Query
DCL → Control
TCL → Transaction


This content originally appeared on DEV Community and was authored by Aruna Arun


Print Share Comment Cite Upload Translate Updates
APA

Aruna Arun | Sciencx (2025-08-19T14:43:52+00:00) Day1: SQL. Retrieved from https://www.scien.cx/2025/08/19/day1-sql/

MLA
" » Day1: SQL." Aruna Arun | Sciencx - Tuesday August 19, 2025, https://www.scien.cx/2025/08/19/day1-sql/
HARVARD
Aruna Arun | Sciencx Tuesday August 19, 2025 » Day1: SQL., viewed ,<https://www.scien.cx/2025/08/19/day1-sql/>
VANCOUVER
Aruna Arun | Sciencx - » Day1: SQL. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/19/day1-sql/
CHICAGO
" » Day1: SQL." Aruna Arun | Sciencx - Accessed . https://www.scien.cx/2025/08/19/day1-sql/
IEEE
" » Day1: SQL." Aruna Arun | Sciencx [Online]. Available: https://www.scien.cx/2025/08/19/day1-sql/. [Accessed: ]
rf:citation
» Day1: SQL | Aruna Arun | Sciencx | https://www.scien.cx/2025/08/19/day1-sql/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.