[go: up one dir, main page]

0% found this document useful (0 votes)
37 views3 pages

SQL Complete Guide

The document is a comprehensive guide to SQL, covering its various components including Data Definition Language (DDL), Data Manipulation Language (DML), and Data Query Language (DQL). It also discusses advanced topics such as joins, subqueries, views, and normalization. Key concepts like constraints, indexes, stored procedures, and aggregate functions are also included.

Uploaded by

sravanth yt
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)
37 views3 pages

SQL Complete Guide

The document is a comprehensive guide to SQL, covering its various components including Data Definition Language (DDL), Data Manipulation Language (DML), and Data Query Language (DQL). It also discusses advanced topics such as joins, subqueries, views, and normalization. Key concepts like constraints, indexes, stored procedures, and aggregate functions are also included.

Uploaded by

sravanth yt
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/ 3

Complete SQL Concepts Guide

1. Introduction to SQL

SQL (Structured Query Language) is used to communicate with and manage databases. It is the standard

language for relational database management systems.

2. Data Definition Language (DDL)

- CREATE: create new tables or databases

- ALTER: modify existing tables

- DROP: delete tables or databases

- TRUNCATE: delete all rows in a table

3. Data Manipulation Language (DML)

- INSERT: insert new data

- UPDATE: modify existing data

- DELETE: remove data

4. Data Query Language (DQL)

- SELECT: used to fetch data from a database

5. Data Control Language (DCL)

- GRANT: give user access rights

- REVOKE: remove user access rights

6. Transaction Control Language (TCL)

- COMMIT: save changes

- ROLLBACK: undo changes

- SAVEPOINT: set a point for partial rollback


Complete SQL Concepts Guide

7. Constraints

NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK, DEFAULT

8. Joins

INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, CROSS JOIN, SELF JOIN

9. Subqueries

Nested SELECT statements inside other queries

10. Views

Virtual tables created with SELECT statements

11. Indexes

Used to speed up retrieval of data

12. Stored Procedures & Functions

Reusable SQL blocks stored in the database

13. Triggers

Procedures that automatically run when certain events occur

14. Normalization

Organizing data to reduce redundancy: 1NF, 2NF, 3NF, BCNF

15. Aggregate Functions

SUM, COUNT, AVG, MIN, MAX


Complete SQL Concepts Guide

16. Grouping & Filtering

GROUP BY, HAVING, WHERE

17. Clauses

ORDER BY, LIMIT, OFFSET, DISTINCT

18. Set Operations

UNION, INTERSECT, EXCEPT

19. Case Statements

Used to create conditional logic in queries

20. Window Functions

ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD etc.

You might also like