SlideShare a Scribd company logo
Introduction to SQL
• Structured Query Language Basics
• Presented by: [Your Name]
• Date: [Presentation Date]
What is SQL?
• - SQL stands for Structured Query Language
• - Used to communicate with databases
• - Standard for relational databases
• - Examples: MySQL, PostgreSQL, SQL Server,
Oracle, SQLite
Why Use SQL?
• - Store and retrieve data efficiently
• - Handle large data volumes
• - Ensure data integrity
• - Essential for developers, analysts, DBAs
SQL Syntax Overview
• - SQL is not case-sensitive
• - Statements end with semicolon (;)
• Example:
• SELECT * FROM customers;
Basic SQL Commands
• - DDL: CREATE, ALTER, DROP
• - DML: SELECT, INSERT, UPDATE, DELETE
• - DCL: GRANT, REVOKE
• - TCL: COMMIT, ROLLBACK, SAVEPOINT
SELECT Statement
• - Retrieves data from tables
• Example:
• SELECT name, email FROM users;
WHERE Clause
• - Filters records based on condition
• Example:
• SELECT * FROM employees WHERE salary >
50000;
INSERT, UPDATE, DELETE
• - INSERT: Add new data
• INSERT INTO users (name, email) VALUES
('Alice', 'alice@mail.com');
• - UPDATE: Modify data
• UPDATE users SET email = 'alice@new.com'
WHERE name = 'Alice';
• - DELETE: Remove data
• DELETE FROM users WHERE name = 'Alice';
SQL Joins
• - Combines rows from tables
• Types: INNER, LEFT, RIGHT, FULL
• Example:
• SELECT orders.id, customers.name
• FROM orders
• INNER JOIN customers ON orders.customer_id
= customers.id;
SQL Functions
• - Aggregate: COUNT(), SUM(), AVG(), MAX(),
MIN()
• - String: UPPER(), LOWER(), LENGTH()
• Example:
• SELECT COUNT(*) FROM products WHERE
price > 100;
GROUP BY and HAVING
• - GROUP BY groups similar rows
• - HAVING filters groups
• Example:
• SELECT department, COUNT(*)
• FROM employees
• GROUP BY department
• HAVING COUNT(*) > 5;
ORDER BY Clause
• - Sorts result set
• - ASC (ascending), DESC (descending)
• Example:
• SELECT name, salary FROM employees ORDER
BY salary DESC;
Creating and Modifying Tables
• - CREATE TABLE:
• CREATE TABLE users (
• id INT PRIMARY KEY,
• name VARCHAR(100),
• email VARCHAR(100)
• );
• - ALTER TABLE to modify
• - DROP TABLE to delete
SQL Constraints
• - Ensure data integrity
• Common:
• - PRIMARY KEY
• - FOREIGN KEY
• - NOT NULL
• - UNIQUE
• - CHECK
• - DEFAULT
Real-World Applications
• - Backend development
• - BI and data analytics
• - Data warehousing
• - Reporting and dashboards
• - Automation scripts
Summary
• - SQL = foundation of data
• - Learn SELECT, INSERT, JOIN, etc.
• - Practice on MySQL, PostgreSQL
Questions & Answers
• Any questions?
• Let’s discuss use cases or advanced SQL topics.

More Related Content

Similar to SQL_Presentation.ppt basic version 12.32 (20)

PDF
sql notes Provideby AGN HUB Tech & It Solutions
mohanagn2244
 
PPT
Sql Tutorials
Priyabrat Kar
 
PPT
dbs class 7.ppt
MARasheed3
 
PPTX
SQL_Introduction_PresentatioFDFdfFfn.pptx
dejiw91154
 
PPT
Db1 lecture4
Sherif Gad
 
PDF
Structure query language, database course
yunussufyan2024
 
PPTX
Introduction to sql new
SANTOSH RATH
 
PPTX
introduction to SQL query language beginner.ppt
PatriceRochon1
 
PPT
DBMS-SQL-Commands-BBA-4-Sem-1-PanjabUniversity.ppt
NishaGupta92113
 
PPT
SQL Presentation-1 (structured query language)
renodet116
 
PPT
SQL Presentation-1 yehjebjj yeuu helo the worls.ppt
nanisaketh
 
PDF
Sql overview-1232931296681161-1
sagaroceanic11
 
PPT
SQL.ppt
Ranjit273515
 
PPT
MY SQL
sundar
 
PPTX
The SQL Query Language: Simple SELECT Commands
teamspeer05
 
PPTX
SQL : Structured Query Language
Abhishek Gautam
 
DOC
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
Newyorksys.com
 
PPTX
SQl data base management and design
franckelsania20
 
PPTX
SQL LECTURE.pptx
TechnoSavage
 
sql notes Provideby AGN HUB Tech & It Solutions
mohanagn2244
 
Sql Tutorials
Priyabrat Kar
 
dbs class 7.ppt
MARasheed3
 
SQL_Introduction_PresentatioFDFdfFfn.pptx
dejiw91154
 
Db1 lecture4
Sherif Gad
 
Structure query language, database course
yunussufyan2024
 
Introduction to sql new
SANTOSH RATH
 
introduction to SQL query language beginner.ppt
PatriceRochon1
 
DBMS-SQL-Commands-BBA-4-Sem-1-PanjabUniversity.ppt
NishaGupta92113
 
SQL Presentation-1 (structured query language)
renodet116
 
SQL Presentation-1 yehjebjj yeuu helo the worls.ppt
nanisaketh
 
Sql overview-1232931296681161-1
sagaroceanic11
 
SQL.ppt
Ranjit273515
 
MY SQL
sundar
 
The SQL Query Language: Simple SELECT Commands
teamspeer05
 
SQL : Structured Query Language
Abhishek Gautam
 
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
Newyorksys.com
 
SQl data base management and design
franckelsania20
 
SQL LECTURE.pptx
TechnoSavage
 

Recently uploaded (20)

PPTX
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
PPTX
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
PDF
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
PPTX
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
PPTX
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PPTX
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PPTX
Presentation: Climate Citizenship Digital Education
Karl Donert
 
PPTX
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PPTX
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
PDF
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
Explorando Recursos do Summer '25: Dicas Essenciais - 02
Mauricio Alexandre Silva
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
How to Create Rental Orders in Odoo 18 Rental
Celine George
 
HEAD INJURY IN CHILDREN: NURSING MANAGEMENGT.pptx
PRADEEP ABOTHU
 
1, 2, 3… E MAIS UM CICLO CHEGA AO FIM!.pdf
Colégio Santa Teresinha
 
SCHOOL-BASED SEXUAL HARASSMENT PREVENTION AND RESPONSE WORKSHOP
komlalokoe
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
CONVULSIVE DISORDERS: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
How to Manage Access Rights & User Types in Odoo 18
Celine George
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
Optimizing Cancer Screening With MCED Technologies: From Science to Practical...
i3 Health
 
digestive system for Pharm d I year HAP
rekhapositivity
 
Presentation: Climate Citizenship Digital Education
Karl Donert
 
ROLE OF ANTIOXIDANT IN EYE HEALTH MANAGEMENT.pptx
Subham Panja
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
The-Beginnings-of-Indian-Civilisation.pdf/6th class new ncert social/by k san...
Sandeep Swamy
 
Ad

SQL_Presentation.ppt basic version 12.32

  • 1. Introduction to SQL • Structured Query Language Basics • Presented by: [Your Name] • Date: [Presentation Date]
  • 2. What is SQL? • - SQL stands for Structured Query Language • - Used to communicate with databases • - Standard for relational databases • - Examples: MySQL, PostgreSQL, SQL Server, Oracle, SQLite
  • 3. Why Use SQL? • - Store and retrieve data efficiently • - Handle large data volumes • - Ensure data integrity • - Essential for developers, analysts, DBAs
  • 4. SQL Syntax Overview • - SQL is not case-sensitive • - Statements end with semicolon (;) • Example: • SELECT * FROM customers;
  • 5. Basic SQL Commands • - DDL: CREATE, ALTER, DROP • - DML: SELECT, INSERT, UPDATE, DELETE • - DCL: GRANT, REVOKE • - TCL: COMMIT, ROLLBACK, SAVEPOINT
  • 6. SELECT Statement • - Retrieves data from tables • Example: • SELECT name, email FROM users;
  • 7. WHERE Clause • - Filters records based on condition • Example: • SELECT * FROM employees WHERE salary > 50000;
  • 8. INSERT, UPDATE, DELETE • - INSERT: Add new data • INSERT INTO users (name, email) VALUES ('Alice', '[email protected]'); • - UPDATE: Modify data • UPDATE users SET email = '[email protected]' WHERE name = 'Alice'; • - DELETE: Remove data • DELETE FROM users WHERE name = 'Alice';
  • 9. SQL Joins • - Combines rows from tables • Types: INNER, LEFT, RIGHT, FULL • Example: • SELECT orders.id, customers.name • FROM orders • INNER JOIN customers ON orders.customer_id = customers.id;
  • 10. SQL Functions • - Aggregate: COUNT(), SUM(), AVG(), MAX(), MIN() • - String: UPPER(), LOWER(), LENGTH() • Example: • SELECT COUNT(*) FROM products WHERE price > 100;
  • 11. GROUP BY and HAVING • - GROUP BY groups similar rows • - HAVING filters groups • Example: • SELECT department, COUNT(*) • FROM employees • GROUP BY department • HAVING COUNT(*) > 5;
  • 12. ORDER BY Clause • - Sorts result set • - ASC (ascending), DESC (descending) • Example: • SELECT name, salary FROM employees ORDER BY salary DESC;
  • 13. Creating and Modifying Tables • - CREATE TABLE: • CREATE TABLE users ( • id INT PRIMARY KEY, • name VARCHAR(100), • email VARCHAR(100) • ); • - ALTER TABLE to modify • - DROP TABLE to delete
  • 14. SQL Constraints • - Ensure data integrity • Common: • - PRIMARY KEY • - FOREIGN KEY • - NOT NULL • - UNIQUE • - CHECK • - DEFAULT
  • 15. Real-World Applications • - Backend development • - BI and data analytics • - Data warehousing • - Reporting and dashboards • - Automation scripts
  • 16. Summary • - SQL = foundation of data • - Learn SELECT, INSERT, JOIN, etc. • - Practice on MySQL, PostgreSQL
  • 17. Questions & Answers • Any questions? • Let’s discuss use cases or advanced SQL topics.