SlideShare a Scribd company logo
1 of 12
SQL
By Rubab
CS Instructor
IBA Sukkur-Khairpur Campus
ITC Sobhodero
Rubab.itc@suk-iba.edu.pk
By: Ms. Rubab For DIT
Structured Query Language(SQL)
Database language using which we can perform certain operations on the
existing database
We can use this language to create a database.
SQL uses certain commands like Create, Drop, Insert, etc. to carry out the
required tasks
These SQL commands are mainly categorized into four categories
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
DDL (Data Definition Language):
DDL or Data Definition Language consists
of the SQL commands that can be used to
define the database schema. It simply deals
with descriptions of the database schema
and is used to create and modify the
structure of database objects in the
databased is a set of SQL commands used
to create, modify, and delete database
structures but not data. These commands
are normally not used by a general user,
who should be accessing the database via
an application.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
List of DDL commands:
•CREATE: This command is used to create
the database or its objects (like table, index,
function, views, store procedure, and
triggers).
•DROP: This command is used to delete
objects from the database.
•ALTER: This is used to alter the structure
of the database.
•TRUNCATE: This is used to remove all
records from a table, including all spaces
allocated for the records are removed.
•COMMENT: This is used to add comments
to the data dictionary.
•RENAME: This is used to rename an
object existing in the database
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
DDL (Data Definition
Language):
DDL or Data Definition
Language consists of the
SQL commands that can be
used to define the database
schema. It simply deals with
descriptions of the database
schema and is used to create
and modify the structure of
database objects in the
databased is a set of SQL
commands used to create,
modify, and delete database
structures but not data. These
commands are normally not
used by a general user, who
should be accessing the
database via an application.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
DQL (Data Query Language):
DQL statements are used for
performing queries on the data
within schema objects. The purpose
of the DQL Command is to get
some schema relation based on the
query passed to it. We can define
DQL as follows it is a component of
SQL statement that allows getting
data from the database and
imposing order upon it. It includes
the SELECT statement. This
command allows getting the data
out of the database to perform
operations with it. When a SELECT
is fired against a table or tables the
result is compiled into a further
temporary table, which is displayed
or perhaps received by the program
i.e. a front-end.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
DQL (Data Query Language):
DQL Commands:
SELECT: It is used to retrieve data
from the database.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
The SQL commands that deals with
the manipulation of data present in
the database belong to DML or Data
Manipulation Language and this
includes most of the SQL
statements. It is the component of
the SQL statement that controls
access to data and to the database.
Basically, DCL statements are
grouped with DML statements.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
List of DML commands:
•INSERT : It is used to insert data
into a table.
•UPDATE: It is used to update
existing data within a table.
•DELETE : It is used to delete
records from a database table.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
DCL (Data Control Language):
DCL includes commands such as
GRANT and REVOKE which mainly
deal with the rights, permissions,
and other controls of the database
system.
By: Ms. Rubab For DIT
SQL Commands
SQL Commands
DDL – Data
Definition
Language
DQl – Data
Query Language
DML – Data
Manipulation
Language
DCL – Data
Control
Language
List of DCL commands:
•GRANT: This command gives
users access privileges to the
database.
•REVOKE: This command
withdraws the user’s access
privileges given by using the
GRANT command.
By: Ms. Rubab For DIT

More Related Content

Similar to SQL Introduction.pptx

Sql server difference faqs- 6
Sql server difference faqs- 6Sql server difference faqs- 6
Sql server difference faqs- 6Umar Ali
 
SQL Training courses.pptx
SQL Training courses.pptxSQL Training courses.pptx
SQL Training courses.pptxirfanakram32
 
Structured query language
Structured query languageStructured query language
Structured query languageRashid Ansari
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQLEhsan Hamzei
 
introductiontosql-161216154706.pdf
introductiontosql-161216154706.pdfintroductiontosql-161216154706.pdf
introductiontosql-161216154706.pdfssusere4c6aa
 
Structured Query Language
Structured Query LanguageStructured Query Language
Structured Query LanguageSurkhab Shelly
 
IM02: Database Language
IM02: Database LanguageIM02: Database Language
IM02: Database LanguageKelvin Chan
 
6.Database Languages lab-1.pptx
6.Database Languages lab-1.pptx6.Database Languages lab-1.pptx
6.Database Languages lab-1.pptxAshokRachapalli1
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08Hassen Poreya
 
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdhdbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdhsaisanthoshreddy143
 

Similar to SQL Introduction.pptx (20)

SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
 
SQL
SQLSQL
SQL
 
SQL 3.pptx
SQL 3.pptxSQL 3.pptx
SQL 3.pptx
 
Sql queries
Sql queriesSql queries
Sql queries
 
Sql server difference faqs- 6
Sql server difference faqs- 6Sql server difference faqs- 6
Sql server difference faqs- 6
 
Database Languages.pptx
Database Languages.pptxDatabase Languages.pptx
Database Languages.pptx
 
SQL Training courses.pptx
SQL Training courses.pptxSQL Training courses.pptx
SQL Training courses.pptx
 
Structured query language
Structured query languageStructured query language
Structured query language
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
introductiontosql-161216154706.pdf
introductiontosql-161216154706.pdfintroductiontosql-161216154706.pdf
introductiontosql-161216154706.pdf
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Structured Query Language
Structured Query LanguageStructured Query Language
Structured Query Language
 
IM02: Database Language
IM02: Database LanguageIM02: Database Language
IM02: Database Language
 
6.Database Languages lab-1.pptx
6.Database Languages lab-1.pptx6.Database Languages lab-1.pptx
6.Database Languages lab-1.pptx
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
 
lovely
lovelylovely
lovely
 
U nit 1_dbms
U nit 1_dbmsU nit 1_dbms
U nit 1_dbms
 
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdhdbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
dbms gdjdjdjehdhdjjdjdudjdjdjdhhdhdbdhdhdh
 

More from RUBAB79

Database.docx
Database.docxDatabase.docx
Database.docxRUBAB79
 
RDBMS.docx
RDBMS.docxRDBMS.docx
RDBMS.docxRUBAB79
 
MySQL String Functions.docx
MySQL String Functions.docxMySQL String Functions.docx
MySQL String Functions.docxRUBAB79
 
Difference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docxDifference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docxRUBAB79
 
SQL Keywords and Functions.pptx
SQL Keywords and Functions.pptxSQL Keywords and Functions.pptx
SQL Keywords and Functions.pptxRUBAB79
 
Ms Access 1.pptx
Ms Access 1.pptxMs Access 1.pptx
Ms Access 1.pptxRUBAB79
 
Lecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptxLecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptxRUBAB79
 
SQL Operators.pptx
SQL Operators.pptxSQL Operators.pptx
SQL Operators.pptxRUBAB79
 
SQL Commands Part 1.pptx
SQL Commands Part 1.pptxSQL Commands Part 1.pptx
SQL Commands Part 1.pptxRUBAB79
 
Database Lecture 3.pptx
Database Lecture 3.pptxDatabase Lecture 3.pptx
Database Lecture 3.pptxRUBAB79
 
SQL Conversion Functions.pptx
SQL Conversion Functions.pptxSQL Conversion Functions.pptx
SQL Conversion Functions.pptxRUBAB79
 
SQL Commands Part 3.pptx
SQL Commands Part 3.pptxSQL Commands Part 3.pptx
SQL Commands Part 3.pptxRUBAB79
 
SQL Commands Part 2.pptx
SQL Commands Part 2.pptxSQL Commands Part 2.pptx
SQL Commands Part 2.pptxRUBAB79
 
DATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptxDATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptxRUBAB79
 

More from RUBAB79 (14)

Database.docx
Database.docxDatabase.docx
Database.docx
 
RDBMS.docx
RDBMS.docxRDBMS.docx
RDBMS.docx
 
MySQL String Functions.docx
MySQL String Functions.docxMySQL String Functions.docx
MySQL String Functions.docx
 
Difference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docxDifference between RDBMS and DBMS.docx
Difference between RDBMS and DBMS.docx
 
SQL Keywords and Functions.pptx
SQL Keywords and Functions.pptxSQL Keywords and Functions.pptx
SQL Keywords and Functions.pptx
 
Ms Access 1.pptx
Ms Access 1.pptxMs Access 1.pptx
Ms Access 1.pptx
 
Lecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptxLecture 4-RDBMS.pptx
Lecture 4-RDBMS.pptx
 
SQL Operators.pptx
SQL Operators.pptxSQL Operators.pptx
SQL Operators.pptx
 
SQL Commands Part 1.pptx
SQL Commands Part 1.pptxSQL Commands Part 1.pptx
SQL Commands Part 1.pptx
 
Database Lecture 3.pptx
Database Lecture 3.pptxDatabase Lecture 3.pptx
Database Lecture 3.pptx
 
SQL Conversion Functions.pptx
SQL Conversion Functions.pptxSQL Conversion Functions.pptx
SQL Conversion Functions.pptx
 
SQL Commands Part 3.pptx
SQL Commands Part 3.pptxSQL Commands Part 3.pptx
SQL Commands Part 3.pptx
 
SQL Commands Part 2.pptx
SQL Commands Part 2.pptxSQL Commands Part 2.pptx
SQL Commands Part 2.pptx
 
DATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptxDATABASE Lecture 1 and 2.pptx
DATABASE Lecture 1 and 2.pptx
 

Recently uploaded

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 

SQL Introduction.pptx

  • 1. SQL By Rubab CS Instructor IBA Sukkur-Khairpur Campus ITC Sobhodero Rubab.itc@suk-iba.edu.pk By: Ms. Rubab For DIT
  • 2. Structured Query Language(SQL) Database language using which we can perform certain operations on the existing database We can use this language to create a database. SQL uses certain commands like Create, Drop, Insert, etc. to carry out the required tasks These SQL commands are mainly categorized into four categories By: Ms. Rubab For DIT
  • 3. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language By: Ms. Rubab For DIT
  • 4. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language DDL (Data Definition Language): DDL or Data Definition Language consists of the SQL commands that can be used to define the database schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the databased is a set of SQL commands used to create, modify, and delete database structures but not data. These commands are normally not used by a general user, who should be accessing the database via an application. By: Ms. Rubab For DIT
  • 5. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language List of DDL commands: •CREATE: This command is used to create the database or its objects (like table, index, function, views, store procedure, and triggers). •DROP: This command is used to delete objects from the database. •ALTER: This is used to alter the structure of the database. •TRUNCATE: This is used to remove all records from a table, including all spaces allocated for the records are removed. •COMMENT: This is used to add comments to the data dictionary. •RENAME: This is used to rename an object existing in the database By: Ms. Rubab For DIT
  • 6. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language DDL (Data Definition Language): DDL or Data Definition Language consists of the SQL commands that can be used to define the database schema. It simply deals with descriptions of the database schema and is used to create and modify the structure of database objects in the databased is a set of SQL commands used to create, modify, and delete database structures but not data. These commands are normally not used by a general user, who should be accessing the database via an application. By: Ms. Rubab For DIT
  • 7. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language DQL (Data Query Language): DQL statements are used for performing queries on the data within schema objects. The purpose of the DQL Command is to get some schema relation based on the query passed to it. We can define DQL as follows it is a component of SQL statement that allows getting data from the database and imposing order upon it. It includes the SELECT statement. This command allows getting the data out of the database to perform operations with it. When a SELECT is fired against a table or tables the result is compiled into a further temporary table, which is displayed or perhaps received by the program i.e. a front-end. By: Ms. Rubab For DIT
  • 8. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language DQL (Data Query Language): DQL Commands: SELECT: It is used to retrieve data from the database. By: Ms. Rubab For DIT
  • 9. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language The SQL commands that deals with the manipulation of data present in the database belong to DML or Data Manipulation Language and this includes most of the SQL statements. It is the component of the SQL statement that controls access to data and to the database. Basically, DCL statements are grouped with DML statements. By: Ms. Rubab For DIT
  • 10. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language List of DML commands: •INSERT : It is used to insert data into a table. •UPDATE: It is used to update existing data within a table. •DELETE : It is used to delete records from a database table. By: Ms. Rubab For DIT
  • 11. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language DCL (Data Control Language): DCL includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions, and other controls of the database system. By: Ms. Rubab For DIT
  • 12. SQL Commands SQL Commands DDL – Data Definition Language DQl – Data Query Language DML – Data Manipulation Language DCL – Data Control Language List of DCL commands: •GRANT: This command gives users access privileges to the database. •REVOKE: This command withdraws the user’s access privileges given by using the GRANT command. By: Ms. Rubab For DIT