175658630409872728_SQL_Presentation.pptx

TECHDPS 9 views 9 slides Aug 30, 2025
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

Sql


Slide Content

Introduction to SQL Structured Query Language Basics

What is SQL? • SQL stands for Structured Query Language • Used to communicate with databases • SQL is the standard language for Relational Database Management Systems (RDBMS) • Examples: MySQL, PostgreSQL, Oracle, SQL Server

Basic SQL Commands • SELECT – retrieve data from a database • INSERT – add new data • UPDATE – modify existing data • DELETE – remove data • CREATE – create new tables/databases • DROP – delete tables/databases

SELECT Statement • Used to retrieve data from one or more tables • Syntax: SELECT column1, column2 FROM table_name WHERE condition; • Example: SELECT name, age FROM students WHERE age > 18;

Filtering Data with WHERE • WHERE clause filters records • Operators: =, >, <, >=, <=, <>, LIKE, IN, BETWEEN • Example: SELECT * FROM employees WHERE salary > 50000;

Sorting and Limiting Data • ORDER BY – sort results (ASC/DESC) • LIMIT – restrict number of rows returned • Example: SELECT * FROM products ORDER BY price DESC LIMIT 5;

Joins in SQL • JOIN is used to combine rows from two or more tables • Types of joins: – INNER JOIN – LEFT JOIN – RIGHT JOIN – FULL OUTER JOIN • Example: SELECT students.name, courses.course_name FROM students INNER JOIN courses ON students.course_id = courses.id;

Aggregate Functions • Used to perform calculations on data • Common functions: – COUNT() – SUM() – AVG() – MIN() – MAX() • Example: SELECT AVG(salary) FROM employees;

Conclusion • SQL is essential for managing and manipulating data • Provides commands for querying, inserting, updating, and deleting data • Widely used in databases like MySQL, PostgreSQL, Oracle, and SQL Server
Tags