SQL (Structured Query Language) is used to manage relational databases. It includes DDL (Data Definition), DML (Data Manipulation), DCL (Control), and TCL (Transaction) for creating, querying, and securing data.
Welcome to the SQL Mastery repository — your one-stop resource to learn and master SQL (Structured Query Language), the standard language for managing and manipulating relational databases.
SQL (Structured Query Language) is a domain-specific language used in programming and managing data held in relational database management systems (RDBMS). It enables users to store, retrieve, manipulate, and analyze data efficiently.
- Manage large volumes of structured data.
- Perform queries to retrieve specific information.
- Create and modify database schemas.
- Ensure data integrity and relationships.
- Provide fine-grained access control and security.
Used to define and manage database structures.
| Command | Description |
|---|---|
CREATE |
Create database objects |
ALTER |
Modify structure |
DROP |
Delete database objects |
TRUNCATE |
Remove all records from a table |
Used for inserting, updating, and deleting data.
| Command | Description |
|---|---|
INSERT |
Add new records |
UPDATE |
Modify existing data |
DELETE |
Remove data |
Used for querying the data.
| Command | Description |
|---|---|
SELECT |
Retrieve data from tables |
Used to control access to data.
| Command | Description |
|---|---|
GRANT |
Give user access |
REVOKE |
Remove user access |
Used to manage transactions.
| Command | Description |
|---|---|
COMMIT |
Save changes permanently |
ROLLBACK |
Undo changes since last COMMIT |
SAVEPOINT |
Set a point to partially rollback |