SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
Introduction to SQL
1
Introduction to SQL
 SQL (pronounced "ess-que-el") stands for
Structured Query Language.
 SQL is used to communicate with a database.
According to ANSI (American National Standards
Institute), it is the standard language for relational
database management systems. SQL statements
are used to perform tasks such as update data on a
database, or retrieve data from a database
2
Introduction to SQL(CONT)
 However, the standard SQL commands such
as "Select", "Insert", "Update", "Delete",
"Create",
Query
 A query is an inquiry to the database for
information. A query is usually issued to the
database through an application interface or
via a command line prompt.
3
Types of SQL Commands
 The main categories are
 DDL (Data Definition Language)
 DML (Data Manipulation Language)
 DQL (Data Query Language)
 DCL (Data Control Language)
 Data administration commands
 Transactional control commands
4
Defining Database Structures
 Data Definition Language, DDL,
 Subset of sql statements.
 is the part of SQL that allows a database user to create and
restructure database objects, such as the creation or the
deletion of a table.
 Some of the most fundamental DDL commands discussed
during following hours include the following:
 CREATE TABLE
 ALTER TABLE (for add or drop cloumn’s in table )
 Change the datatype of cloumn’s
 DROP TABLE
5
Manipulating Data
 Data Manipulation Language, DML, is the part
of SQL used to manipulate data within objects of
a relational database.
 Sometime It is also called read only quary.
 There are three basic DML commands:
 SELECT
 INSERT
 UPDATE
 DELETE
6
Create Query
 Syntax
Create DATABASE database_name
Now we want to create database called
“mydb”. We use the following CREATE
DATABASE statement:
CREATE DATABASE my_db
7
Selecting Data
 Though comprised of only one command, Data
Query Language (DQL) is the most concentrated
focus of SQL for modern relational database
users. The base command is as follows:
 SELECT
 This command, accompanied by many options
and clauses, is used to compose queries against a
relational database. Queries, from simple to
complex, from vague to specific, can be easily
created.
8
Data Control Language
 Data control commands in SQL allow you to control
access to data within the database.
 These DCL commands are normally used to create
objects related to user access and also control the
distribution of privileges among users.
 Some data control commands are as follows:
 GRANT
 REVOKE
9
Data Control Language
 Data control commands in SQL allow you to control
access to data within the database.
 These DCL commands are normally used to create
objects related to user access and also control the
distribution of privileges among users.
 Some data control commands are as follows:
 GRANT
 REVOKE
9

More Related Content

What's hot (20)

PDF
SQL Overview
Stewart Rogers
 
PPTX
Basic SQL and History
SomeshwarMoholkar
 
PPTX
Sql(structured query language)
Ishucs
 
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
PPT
Including Constraints -Oracle Data base
Salman Memon
 
PDF
PL/SQL TRIGGERS
Lakshman Basnet
 
PPT
Introduction to-sql
BG Java EE Course
 
ODP
Ms sql-server
Md.Mojibul Hoque
 
ODP
Sql commands
Balakumaran Arunachalam
 
PPTX
Sql commands
Pooja Dixit
 
PPT
Sql – Structured Query Language
pandey3045_bit
 
PPTX
SQL(DDL & DML)
Sharad Dubey
 
PPT
Restricting and Sorting Data - Oracle Data Base
Salman Memon
 
PPT
Sql Tutorials
Priyabrat Kar
 
PPTX
Structured Query Language (SQL)
Syed Hassan Ali
 
PPTX
SQL
Shyam Khant
 
PPT
PL/SQL Introduction and Concepts
Bharat Kalia
 
DOC
SQL
Shunya Ram
 
PDF
SQL Joins With Examples | Edureka
Edureka!
 
SQL Overview
Stewart Rogers
 
Basic SQL and History
SomeshwarMoholkar
 
Sql(structured query language)
Ishucs
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Including Constraints -Oracle Data base
Salman Memon
 
PL/SQL TRIGGERS
Lakshman Basnet
 
Introduction to-sql
BG Java EE Course
 
Ms sql-server
Md.Mojibul Hoque
 
Sql commands
Pooja Dixit
 
Sql – Structured Query Language
pandey3045_bit
 
SQL(DDL & DML)
Sharad Dubey
 
Restricting and Sorting Data - Oracle Data Base
Salman Memon
 
Sql Tutorials
Priyabrat Kar
 
Structured Query Language (SQL)
Syed Hassan Ali
 
PL/SQL Introduction and Concepts
Bharat Kalia
 
SQL Joins With Examples | Edureka
Edureka!
 

Similar to Introduction to SQL (20)

DOCX
Types of sql commands by naveen kumar veligeti
Naveen Kumar Veligeti
 
PPTX
Structured query language
Rashid Ansari
 
PPTX
Introduction to SQL.pptx
shubhidas
 
PPTX
SQL Introduction.pptx
RUBAB79
 
PPTX
An intoduction to sql and its components
Monika Jain DAIMSR
 
PPTX
DBMSLab_SQL_4thsem_CI_17163544545446962.pptx
dgfs55437
 
PDF
SQL_NOTES.pdf
AnshumanDwivedi14
 
PDF
Structures query language ___PPT (1).pdf
tipurple7989
 
PPTX
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 
PPTX
Using Basic Structured Query Language lo1.pptx
TsedaleBayabil
 
PPTX
Structured Query Language
Surkhab Shelly
 
PPTX
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
EliasPetros
 
PPTX
Lecture 9 (Week 8) - Structured Query Language (SQL).pptx
motivationalvideos54
 
PPTX
SQL commands powerpoint presentation. Ppt
umadevikakarlapudi
 
PPTX
Unit - II.pptx
MrsSavitaKumbhare
 
PPTX
structures query langauge basic for learners
syedalishahid6
 
PDF
sql notes Provideby AGN HUB Tech & It Solutions
mohanagn2244
 
PPTX
SQLGuide.ppt.pptx
ssuser4fc7a8
 
PPTX
SQLGuide.ppt.pptx
ssuser4fc7a8
 
Types of sql commands by naveen kumar veligeti
Naveen Kumar Veligeti
 
Structured query language
Rashid Ansari
 
Introduction to SQL.pptx
shubhidas
 
SQL Introduction.pptx
RUBAB79
 
An intoduction to sql and its components
Monika Jain DAIMSR
 
DBMSLab_SQL_4thsem_CI_17163544545446962.pptx
dgfs55437
 
SQL_NOTES.pdf
AnshumanDwivedi14
 
Structures query language ___PPT (1).pdf
tipurple7989
 
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 
Using Basic Structured Query Language lo1.pptx
TsedaleBayabil
 
Structured Query Language
Surkhab Shelly
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
EliasPetros
 
Lecture 9 (Week 8) - Structured Query Language (SQL).pptx
motivationalvideos54
 
SQL commands powerpoint presentation. Ppt
umadevikakarlapudi
 
Unit - II.pptx
MrsSavitaKumbhare
 
structures query langauge basic for learners
syedalishahid6
 
sql notes Provideby AGN HUB Tech & It Solutions
mohanagn2244
 
SQLGuide.ppt.pptx
ssuser4fc7a8
 
SQLGuide.ppt.pptx
ssuser4fc7a8
 
Ad

More from Tayyab Hussain (10)

PPTX
Networking devices
Tayyab Hussain
 
PPTX
Ipv6 presention
Tayyab Hussain
 
PPTX
Deadlock in database
Tayyab Hussain
 
PPTX
Input devices presentation
Tayyab Hussain
 
PPTX
Self discipline
Tayyab Hussain
 
PPT
Prejudice and stereotyping
Tayyab Hussain
 
PPT
Newtons law of motion
Tayyab Hussain
 
PPT
Generations of computers
Tayyab Hussain
 
PPTX
Topology
Tayyab Hussain
 
PPTX
Ipv6 presention
Tayyab Hussain
 
Networking devices
Tayyab Hussain
 
Ipv6 presention
Tayyab Hussain
 
Deadlock in database
Tayyab Hussain
 
Input devices presentation
Tayyab Hussain
 
Self discipline
Tayyab Hussain
 
Prejudice and stereotyping
Tayyab Hussain
 
Newtons law of motion
Tayyab Hussain
 
Generations of computers
Tayyab Hussain
 
Topology
Tayyab Hussain
 
Ipv6 presention
Tayyab Hussain
 
Ad

Recently uploaded (20)

PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
July Patch Tuesday
Ivanti
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 

Introduction to SQL

  • 2. Introduction to SQL  SQL (pronounced "ess-que-el") stands for Structured Query Language.  SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database 2
  • 3. Introduction to SQL(CONT)  However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", Query  A query is an inquiry to the database for information. A query is usually issued to the database through an application interface or via a command line prompt. 3
  • 4. Types of SQL Commands  The main categories are  DDL (Data Definition Language)  DML (Data Manipulation Language)  DQL (Data Query Language)  DCL (Data Control Language)  Data administration commands  Transactional control commands 4
  • 5. Defining Database Structures  Data Definition Language, DDL,  Subset of sql statements.  is the part of SQL that allows a database user to create and restructure database objects, such as the creation or the deletion of a table.  Some of the most fundamental DDL commands discussed during following hours include the following:  CREATE TABLE  ALTER TABLE (for add or drop cloumn’s in table )  Change the datatype of cloumn’s  DROP TABLE 5
  • 6. Manipulating Data  Data Manipulation Language, DML, is the part of SQL used to manipulate data within objects of a relational database.  Sometime It is also called read only quary.  There are three basic DML commands:  SELECT  INSERT  UPDATE  DELETE 6
  • 7. Create Query  Syntax Create DATABASE database_name Now we want to create database called “mydb”. We use the following CREATE DATABASE statement: CREATE DATABASE my_db 7
  • 8. Selecting Data  Though comprised of only one command, Data Query Language (DQL) is the most concentrated focus of SQL for modern relational database users. The base command is as follows:  SELECT  This command, accompanied by many options and clauses, is used to compose queries against a relational database. Queries, from simple to complex, from vague to specific, can be easily created. 8
  • 9. Data Control Language  Data control commands in SQL allow you to control access to data within the database.  These DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users.  Some data control commands are as follows:  GRANT  REVOKE 9
  • 10. Data Control Language  Data control commands in SQL allow you to control access to data within the database.  These DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users.  Some data control commands are as follows:  GRANT  REVOKE 9