SlideShare a Scribd company logo
5
Most read
6
Most read
15
Most read
1
STRUCTURED QUERY
LANGUAGE
1
WHAT IS
MYSQL…..?
MYSQL is a freely available
open source Relational
Database Management
System that uses Structured
Query Language(SQL).
1
KEY POINTS
Information is stored in tables.
Can store thousands of individual records.
Support a secure environment for storing ,
maintaining and accessing data.
Fast , reliable.
1
DATA
DEFINITION
LANGUAGE
(DDL)
DATA
MANIPULATION
LANGUAGE
(DML)
DATA
CONTROL
LANGUAGE
(DCL)
TRANSACTION
CONTROL
LANGUAGE
(TCL)
SQL
1
DDL
CREATE
ALTER
DROP
DML
INSERT
UPDATE
SELECT
DELETE
DCL
GRANT
REVOKE
TCL
COMMI
T
ROLL
BACK
SAVE
POINT
1
DDL – DATA DEFINITION LANGUAGE
STATEMENTS USED TO CREATE , ALTER,DROP DATABASES
PROJECTS.
-> CREATE: USED TO DEFINE NEW OBJECTS.
-> ALTER: USED TO MODIFY THE DEFINITION OF EXISTING
OBJECTS.
-> DROP: USED TO REMOVE EXISTING UNITS.
-> TRUNCATE TABLE : USED TO REMOVE ALL ROWS
FROM A TABLE WITHOUT LOGGING THE INDIVIDUAL ROW DELETIONS.
1
MYSQL Command line for create
command:
1
DATA DEFINITION
LANGUAGE
(DDL)
Commands that allow you to perform
tasks related to data definition.
Commands used are:
• Create : used to create table.
• Alter : used to add or remove
something from table.
• Drop : used to drop the database.
1
DATA MANIPULATION
LANGUAGE
(DML)
Commands that allow you to manipulate the
data stored in a database.
Commands used are:
• Insert : used to insert data in a table.
• Select : used to select data from table.
• Update : used to make changes in table.
• Delete : used to delete data from table or
the whole table.
1
MYSQL Command line for insert
command:
1
DML – DATA MANIPULATION LANGUAGE.
STATEMENTS USED TO RETRIVE , INSERT , UPDATE ,
REMOVE AND MANAGE DATA WITHIN DB OBJECTS.
-> SELECT : RETRIVES ONE OR MORE ROWS FROM A TABLE VIEW
- >INSERT : INSERT ONE OR MORE ROWS FROM A TABLE OR
VIEW.
->UPDATE : CHANGES EXISTING DATA IN A TABLE OR VIEW.
- >DELETE : REMOVES ONE OR MORE ROWS FROM A TABLE OR A
VIEW.
- >BULK INSERT : IMPORTS A DATA FILE INTO A DATABASES TABLE
OR VIEW IN A USER SPECIFIED FORMAT.
1
DATA CONTROL LANGUAGE
(DCL)
Commands used to control the data by
giving or taking back the privileges or
access.
Command used are:
• Grant : used to grant permission to
user for any task.
• Revoke : used to take back the
permission given to the user.
1
DCL – DATA CONTROL LANGUAGE
STATEMENTS USED TO CONTROL THE ACCESS OF DATA
STORED IN DATABASES AND PROVIDE DATA SECURITY.
-> GRANT : GRANTS PERMISSIONS ON A SECURABLE TO A
PRINCIPAL.
-> REVOKE : REMOVES A PREVIOUSLY GRANTED OR DENIED
PERMISSION.
->EXECUTE AS , STATEMENT : SETS THE EXECUTION CONTEXT OF
A SESSION.
-> EXECUTE AS, CLUASE : DEFINE THE EXECUTION CONTEXT OF
THE FOLLOWING USER DEFINED MOLECULES : FUNCTION
(EXCEPT INLINE TABLE – VALUED FUNCTIONS), PROCEDURES ,
QUEUES AND TRIGGERS.
1
TRANSACTION CONTROL
LANGUAGE
(TCL)Commands used for transaction control
purpose.
Commands used are:
• Commit : ends the current transaction and by
saving database changes and starts a new
transaction.
• Savepoint : defines breakpoints for
transaction to allow partial rollback.
• Rollback : ends the current transaction by
discarding database changes and starts a
new transaction.
1
TCL – TRANSACTION CONTROL LANGUAGE.
STATEMENTS USED TO MANAGE THE CHANGES MADE
BY DML STATEMENTS.IT ALLOWS STATEMENTS TO BE
GROUPED TOGETHER INTO LOGICAL TRANSACTION.
-> BEGIN TRANSACTION : MARKS THE STARTING POINT OF AN
EXCLIPT , LOCAL TRANSACTION INCREAMENTS @@ TRANCOUNT
BY 1.
-> COMMIT TRANSACTION : MARKS THE END OF A SUCCESSFUL
IMPLICT OR EXPLICT TRANSACTION.
-> ROLLBACK TRANSACTION : ROLLS BACK AN EXPLICT OR
IMPLICT TRANSACTION TO THE BEGINNING OF THE
TRANSACTION, OR TO SAVE POINT INSIDE THE TRANSACTION.
1
THANK YOU!
1

More Related Content

PPT
SQL Queries
DOC
PPTX
Introduction to SQL
PPT
Oracle PLSQL Step By Step Guide
PPTX
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
PPTX
SQL Basics
SQL Queries
Introduction to SQL
Oracle PLSQL Step By Step Guide
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
SQL Basics

What's hot (20)

PDF
Sql tutorial
PPTX
SQL - DML and DDL Commands
PPTX
SQL - Structured query language introduction
PPT
Mysql
PPTX
Basic sql Commands
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
PPTX
SQL commands
PPTX
PPT
Introduction to structured query language (sql)
PPTX
Presentation slides of Sequence Query Language (SQL)
PPTX
NOSQL Databases types and Uses
PPTX
database Normalization
PPTX
Structured Query Language (SQL)
PPT
Introduction to-sql
PPTX
trigger dbms
PPT
MYSQL.ppt
PPTX
Chapter 1 introduction to sql server
PPT
Sql – Structured Query Language
PDF
Integrity constraints in dbms
PDF
Sql Basics | Edureka
Sql tutorial
SQL - DML and DDL Commands
SQL - Structured query language introduction
Mysql
Basic sql Commands
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
SQL commands
Introduction to structured query language (sql)
Presentation slides of Sequence Query Language (SQL)
NOSQL Databases types and Uses
database Normalization
Structured Query Language (SQL)
Introduction to-sql
trigger dbms
MYSQL.ppt
Chapter 1 introduction to sql server
Sql – Structured Query Language
Integrity constraints in dbms
Sql Basics | Edureka
Ad

Similar to Sql and Sql commands (20)

PDF
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
PPSX
IM02: Database Language
PPTX
6.Database Languages lab-1.pptx
PDF
our company has an opening for a junior database administrator. As a.pdf
PPTX
BASIC_OF_DATABASE_PPT__new[1].pptx
PPTX
An intoduction to sql and its components
PDF
Test labs 2016. Тестирование data warehouse
PDF
dbms 2.pdf
PPTX
Group Members
PPTX
database management system: sql commands lab sql
DOCX
Oracle 11g SQL Overview
PPTX
Sql queries
PPTX
DML & DCL.pptx
PPTX
Himani uppal-221302130 WP ppt.pptx
PPTX
Introduction to SQL.pptx
PDF
SQL_NOTES.pdf
PDF
my sql
PPTX
PDF
Easy to learning for python SQL_Command_Categories.pdf
PPTX
Database Languages.pptx
Oracle/SQL For Beginners - DDL | DML | DCL | TCL - Quick Learning
IM02: Database Language
6.Database Languages lab-1.pptx
our company has an opening for a junior database administrator. As a.pdf
BASIC_OF_DATABASE_PPT__new[1].pptx
An intoduction to sql and its components
Test labs 2016. Тестирование data warehouse
dbms 2.pdf
Group Members
database management system: sql commands lab sql
Oracle 11g SQL Overview
Sql queries
DML & DCL.pptx
Himani uppal-221302130 WP ppt.pptx
Introduction to SQL.pptx
SQL_NOTES.pdf
my sql
Easy to learning for python SQL_Command_Categories.pdf
Database Languages.pptx
Ad

More from Knowledge Center Computer (20)

PDF
APS PGT Computer Science SylIabus
PPTX
Specialization and generalization quizz
PPTX
Data structure part 3
PPTX
Data structure part 4
PPTX
Data structure part 2
PPTX
Data structure part 1
PPTX
Computer architecture PART 2
PPTX
Computer architecture PART 1
PDF
Course design class 12 ip
PDF
CBSE 12 ip 2018 sample paper
PPTX
Programming languages java, python, sql and compare between c and python
PPTX
E commerce and types
PPTX
Android Operating System(OS)
PPTX
Networking Basic MCQ's TEST
PPTX
PDF
Information assistant exam complete syllabus 2018
PPTX
Computer fundamentals in hindi
PPTX
हिन्‍दी में मल्‍टीपल चॉइस कंप्यूटर साइंस क्विज Part 4
APS PGT Computer Science SylIabus
Specialization and generalization quizz
Data structure part 3
Data structure part 4
Data structure part 2
Data structure part 1
Computer architecture PART 2
Computer architecture PART 1
Course design class 12 ip
CBSE 12 ip 2018 sample paper
Programming languages java, python, sql and compare between c and python
E commerce and types
Android Operating System(OS)
Networking Basic MCQ's TEST
Information assistant exam complete syllabus 2018
Computer fundamentals in hindi
हिन्‍दी में मल्‍टीपल चॉइस कंप्यूटर साइंस क्विज Part 4

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Open folder Downloads.pdf yes yes ges yes
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PDF
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
PDF
Module 3: Health Systems Tutorial Slides S2 2025
PPTX
Introduction and Scope of Bichemistry.pptx
PDF
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
English Language Teaching from Post-.pdf
PDF
Business Ethics Teaching Materials for college
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
Insiders guide to clinical Medicine.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Open folder Downloads.pdf yes yes ges yes
Open Quiz Monsoon Mind Game Final Set.pptx
Mga Unang Hakbang Tungo Sa Tao by Joe Vibar Nero.pdf
Module 3: Health Systems Tutorial Slides S2 2025
Introduction and Scope of Bichemistry.pptx
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
UNDER FIVE CLINICS OR WELL BABY CLINICS.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
English Language Teaching from Post-.pdf
Business Ethics Teaching Materials for college
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O7-L3 Supply Chain Operations - ICLT Program
Revamp in MTO Odoo 18 Inventory - Odoo Slides
Cardiovascular Pharmacology for pharmacy students.pptx
Insiders guide to clinical Medicine.pdf

Sql and Sql commands

  • 1. 1
  • 3. WHAT IS MYSQL…..? MYSQL is a freely available open source Relational Database Management System that uses Structured Query Language(SQL). 1
  • 4. KEY POINTS Information is stored in tables. Can store thousands of individual records. Support a secure environment for storing , maintaining and accessing data. Fast , reliable. 1
  • 7. DDL – DATA DEFINITION LANGUAGE STATEMENTS USED TO CREATE , ALTER,DROP DATABASES PROJECTS. -> CREATE: USED TO DEFINE NEW OBJECTS. -> ALTER: USED TO MODIFY THE DEFINITION OF EXISTING OBJECTS. -> DROP: USED TO REMOVE EXISTING UNITS. -> TRUNCATE TABLE : USED TO REMOVE ALL ROWS FROM A TABLE WITHOUT LOGGING THE INDIVIDUAL ROW DELETIONS. 1
  • 8. MYSQL Command line for create command: 1
  • 9. DATA DEFINITION LANGUAGE (DDL) Commands that allow you to perform tasks related to data definition. Commands used are: • Create : used to create table. • Alter : used to add or remove something from table. • Drop : used to drop the database. 1
  • 10. DATA MANIPULATION LANGUAGE (DML) Commands that allow you to manipulate the data stored in a database. Commands used are: • Insert : used to insert data in a table. • Select : used to select data from table. • Update : used to make changes in table. • Delete : used to delete data from table or the whole table. 1
  • 11. MYSQL Command line for insert command: 1
  • 12. DML – DATA MANIPULATION LANGUAGE. STATEMENTS USED TO RETRIVE , INSERT , UPDATE , REMOVE AND MANAGE DATA WITHIN DB OBJECTS. -> SELECT : RETRIVES ONE OR MORE ROWS FROM A TABLE VIEW - >INSERT : INSERT ONE OR MORE ROWS FROM A TABLE OR VIEW. ->UPDATE : CHANGES EXISTING DATA IN A TABLE OR VIEW. - >DELETE : REMOVES ONE OR MORE ROWS FROM A TABLE OR A VIEW. - >BULK INSERT : IMPORTS A DATA FILE INTO A DATABASES TABLE OR VIEW IN A USER SPECIFIED FORMAT. 1
  • 13. DATA CONTROL LANGUAGE (DCL) Commands used to control the data by giving or taking back the privileges or access. Command used are: • Grant : used to grant permission to user for any task. • Revoke : used to take back the permission given to the user. 1
  • 14. DCL – DATA CONTROL LANGUAGE STATEMENTS USED TO CONTROL THE ACCESS OF DATA STORED IN DATABASES AND PROVIDE DATA SECURITY. -> GRANT : GRANTS PERMISSIONS ON A SECURABLE TO A PRINCIPAL. -> REVOKE : REMOVES A PREVIOUSLY GRANTED OR DENIED PERMISSION. ->EXECUTE AS , STATEMENT : SETS THE EXECUTION CONTEXT OF A SESSION. -> EXECUTE AS, CLUASE : DEFINE THE EXECUTION CONTEXT OF THE FOLLOWING USER DEFINED MOLECULES : FUNCTION (EXCEPT INLINE TABLE – VALUED FUNCTIONS), PROCEDURES , QUEUES AND TRIGGERS. 1
  • 15. TRANSACTION CONTROL LANGUAGE (TCL)Commands used for transaction control purpose. Commands used are: • Commit : ends the current transaction and by saving database changes and starts a new transaction. • Savepoint : defines breakpoints for transaction to allow partial rollback. • Rollback : ends the current transaction by discarding database changes and starts a new transaction. 1
  • 16. TCL – TRANSACTION CONTROL LANGUAGE. STATEMENTS USED TO MANAGE THE CHANGES MADE BY DML STATEMENTS.IT ALLOWS STATEMENTS TO BE GROUPED TOGETHER INTO LOGICAL TRANSACTION. -> BEGIN TRANSACTION : MARKS THE STARTING POINT OF AN EXCLIPT , LOCAL TRANSACTION INCREAMENTS @@ TRANCOUNT BY 1. -> COMMIT TRANSACTION : MARKS THE END OF A SUCCESSFUL IMPLICT OR EXPLICT TRANSACTION. -> ROLLBACK TRANSACTION : ROLLS BACK AN EXPLICT OR IMPLICT TRANSACTION TO THE BEGINNING OF THE TRANSACTION, OR TO SAVE POINT INSIDE THE TRANSACTION. 1