SlideShare a Scribd company logo
7
Most read
10
Most read
17
Most read
SQL Basics
GROUP MEMBERSADIL SHAKIRHAMMAD YOUSAFAMMAR YASIR 			HASEEB KHALIDAWAIS AFTAB BUTTMUDDASIR ABIDBILAL AHMED MOHAMMED IMRANFAIZA KHALID RAAZIA IRSHADHAMMAD RASHEED ZULQARNAIN BAJWA
PrEsEnTeRsHammadBilalAwais
ID : 05
IntroductionA business need
Database“An organized collection of information”OR “Set of tables each having different class of data.”
Structured Query Language ( SQL ) A language to communicate with the database
A tool to retrieve the required information from database
Elements
Syntax of SQL is in plain English
To question the databaseWhat SQL can do?With SQL you can:1. Execute queries against a database2. Perform  CRUD function:CREATE       New databasesNew tables in a database	  Records in a databaseREAD          Retrieve data from a database
UPDATE      Update Records in a database
DELETE         Delete Records from a database
Pre-requisites for SQLRelational Database
Tables
Fields
Records
Different Relationships
1-1
1-m SYNTAXStatementTable NameConditionSELECT CustomerName, City, Country  FROM Customer  WHERE Country=‘USA’ColumnsFROM ClauseWHERE ClauseSELECT Clause
ID : 11
QUERIES
SQL Queries

More Related Content

What's hot (20)

PPT
Joins in SQL
Vigneshwaran Sankaran
 
PPT
PL/SQL Introduction and Concepts
Bharat Kalia
 
PPTX
Sql commands
Pooja Dixit
 
PPTX
Basic SQL and History
SomeshwarMoholkar
 
PPTX
SQL Commands
Sachidananda M H
 
PPT
Introduction to structured query language (sql)
Sabana Maharjan
 
PPTX
sql function(ppt)
Ankit Dubey
 
PDF
SQL Overview
Stewart Rogers
 
PPTX
SQL commands
GirdharRatne
 
PPTX
SQL - DML and DDL Commands
Shrija Madhu
 
PPTX
8. transactions
Amrit Kaur
 
PDF
Sql tutorial
Rumman Ansari
 
ODP
Sql commands
Balakumaran Arunachalam
 
PPTX
joins in database
Sultan Arshad
 
PPTX
Joins And Its Types
Wings Interactive
 
PPTX
Sql fundamentals
Ravinder Kamboj
 
PPTX
SQL(DDL & DML)
Sharad Dubey
 
PPTX
Triggers
Pooja Dixit
 
PDF
MySQL for beginners
Saeid Zebardast
 
PPTX
DATABASE CONSTRAINTS
sunanditaAnand
 
Joins in SQL
Vigneshwaran Sankaran
 
PL/SQL Introduction and Concepts
Bharat Kalia
 
Sql commands
Pooja Dixit
 
Basic SQL and History
SomeshwarMoholkar
 
SQL Commands
Sachidananda M H
 
Introduction to structured query language (sql)
Sabana Maharjan
 
sql function(ppt)
Ankit Dubey
 
SQL Overview
Stewart Rogers
 
SQL commands
GirdharRatne
 
SQL - DML and DDL Commands
Shrija Madhu
 
8. transactions
Amrit Kaur
 
Sql tutorial
Rumman Ansari
 
joins in database
Sultan Arshad
 
Joins And Its Types
Wings Interactive
 
Sql fundamentals
Ravinder Kamboj
 
SQL(DDL & DML)
Sharad Dubey
 
Triggers
Pooja Dixit
 
MySQL for beginners
Saeid Zebardast
 
DATABASE CONSTRAINTS
sunanditaAnand
 

Similar to SQL Basics (20)

PPTX
SQL
Shyam Khant
 
PPTX
Sql slid
pacatarpit
 
PPTX
SQL Server Learning Drive
TechandMate
 
PPTX
DBMS and SQL(structured query language) .pptx
jainendraKUMAR55
 
PDF
Database Architecture and Basic Concepts
Tony Wong
 
PPTX
Joins in SQL
Pooja Dixit
 
PPTX
Understanding-SQL-Joins vvvvvvvvvv.pptx.
carabkamas
 
PPTX
SQL JOIN.pptx
johnwick814916
 
PPTX
Sql(structured query language)
Ishucs
 
PDF
Sql wksht-6
Mukesh Tekwani
 
PDF
Sql ch 12 - creating database
Mukesh Tekwani
 
PPTX
database .pptx
Mohammad Adnan
 
PPTX
Sql practise for beginners
ISsoft
 
DOCX
SQL report
Ahmad Zahid
 
DOCX
Query
Raj Devaraj
 
PPTX
JOINS.pptx
ArunkumarT51
 
PPTX
joins and subqueries in big data analysis
SanSan149
 
PPTX
PRESENTATION........................pptx
ejazayesha485
 
PPT
Join sql
Vikas Gupta
 
Sql slid
pacatarpit
 
SQL Server Learning Drive
TechandMate
 
DBMS and SQL(structured query language) .pptx
jainendraKUMAR55
 
Database Architecture and Basic Concepts
Tony Wong
 
Joins in SQL
Pooja Dixit
 
Understanding-SQL-Joins vvvvvvvvvv.pptx.
carabkamas
 
SQL JOIN.pptx
johnwick814916
 
Sql(structured query language)
Ishucs
 
Sql wksht-6
Mukesh Tekwani
 
Sql ch 12 - creating database
Mukesh Tekwani
 
database .pptx
Mohammad Adnan
 
Sql practise for beginners
ISsoft
 
SQL report
Ahmad Zahid
 
JOINS.pptx
ArunkumarT51
 
joins and subqueries in big data analysis
SanSan149
 
PRESENTATION........................pptx
ejazayesha485
 
Join sql
Vikas Gupta
 
Ad

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Digital Circuits, important subject in CS
contactparinay1
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Ad

SQL Basics

  • 2. GROUP MEMBERSADIL SHAKIRHAMMAD YOUSAFAMMAR YASIR HASEEB KHALIDAWAIS AFTAB BUTTMUDDASIR ABIDBILAL AHMED MOHAMMED IMRANFAIZA KHALID RAAZIA IRSHADHAMMAD RASHEED ZULQARNAIN BAJWA
  • 6. Database“An organized collection of information”OR “Set of tables each having different class of data.”
  • 7. Structured Query Language ( SQL ) A language to communicate with the database
  • 8. A tool to retrieve the required information from database
  • 10. Syntax of SQL is in plain English
  • 11. To question the databaseWhat SQL can do?With SQL you can:1. Execute queries against a database2. Perform CRUD function:CREATE New databasesNew tables in a database  Records in a databaseREAD Retrieve data from a database
  • 12. UPDATE Update Records in a database
  • 13. DELETE  Delete Records from a database
  • 19. 1-1
  • 20. 1-m SYNTAXStatementTable NameConditionSELECT CustomerName, City, Country FROM Customer WHERE Country=‘USA’ColumnsFROM ClauseWHERE ClauseSELECT Clause
  • 25. Function QueriesFunction queries in SQL involve manipulating functions in SQL statements to retrieve desired information from the database.Such function queries are of two broad categories:Aggregate Function Queries
  • 27. SQL JOIN QUERIESSQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.
  • 28. Inner JoinThe INNER JOIN keyword return rows when there is at least one match in both tables.SyntaxSELECT column_name(s)FROM table_name1INNER JOIN table_name2ON table_name1.column_name=table_name2.column_name
  • 29. Outer JoinThe OUTER JOIN clause differs from the INNER JOIN in that rows are returned even when there are no matches through the JOIN critieria on the second table. Difference Explained:Assuming you're joining on columns with no duplicates, which is by far the most common case:An inner join of A and B gives the result of A intersect B, i.e. the inner part of a venn diagram intersection.An outer join of A and B gives the results of A union B, i.e. the outer parts of a venn diagram union.
  • 30. Left Outer JoinThe LEFT JOIN keyword returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2)SyntaxSELECT column_name(s)FROM table_name1LEFT JOIN table_name2ON table_name1.column_name=table_name2.column_name
  • 31. Right Outer JoinThe RIGHT JOIN keyword Return all rows from the right table (table_name2), even if there are no matches in the left table (table_name1)SyntaxSELECT column_name(s)FROM table_name1RIGHT JOIN table_name2ON table_name1.column_name=table_name2.column_name
  • 32. Full JoinThe FULL JOIN keyword return rows when there is a match in one of the tables.SyntaxSELECT column_name(s)FROM table_name1FULL JOIN table_name2ON table_name1.column_name=table_name2.column_name