SlideShare a Scribd company logo
PRESENTED BY:- Mrs. Surkhab Shelly
Assistant Professor In CS
 DML commands are used to modify the
database. It is responsible for all form of
changes in the database.
 The command of DML is not auto-committed
that means it can't permanently save all the
changes in the database. They can be
rollback.
 This statement is used to insert new records into the table.
 INSERT INTO Employee
(EmployeeID, EmployeeName, PhoneNumber, Address, City,
Country)
VALUES
('06', 'Sanjana', '9921321141', 'Camel Street House No
12', 'Chennai', 'India');
 INSERT INTO Employee
VALUES
('07', 'Sayantini', '9934567654', 'Nice Road 21', 'Pune',
'India');
 This statement is used to modify the records
already present in the table.
 UPDATE Employee
SET EmployeeName = 'Aahana', City= 'Ahmedabad'
WHERE EmployeeID = 1;
OR
 UPDATE Employee
SET EmployeeName = 'Aahana', City= 'Ahmedabad‘;
 This statement is used to delete the existing
DELETE FROM Employee WHERE EmployeeName='Preeti';
 This statement is used to select data from a
database and the data returned is stored in a
result table, called the result-set.
1)SELECT EmployeeID, EmployeeName FROM Employee;
 --(*) is used to select all from the table.
2)SELECT * FROM Employee;
 DCL commands are used to grant and take
back authority from any database user.
 Here are some commands that come under
DCL:
 Grant
 Revoke
 Grant: It is used to give user access
privileges to a database.
 Example
GRANT SELECT, UPDATE ON EMPLOYEE TO USER1, USER2;
 Revoke: It is used to take back permissions
from the user.
 Example
REVOKE SELECT, UPDATE ON EMPLOYEE FROM USER1, USER2;
 TCL commands can only use with DML commands like INSERT,
DELETE and UPDATE only.
 These operations are automatically committed in the database
that's why they cannot be used while creating tables or dropping
them.
 Here are some commands that come under TCL:
 COMMIT
 ROLLBACK
 SAVEPOINT
 a. Commit: Commit command is used to save all the transactions
to the database.
 Syntax:
 COMMIT;
 Example:
DELETE FROM CUSTOMERS WHERE AGE = 25;
COMMIT;
 b. Rollback: Rollback command is used to undo
transactions that have not already been saved to
the database.
 Syntax:
 ROLLBACK;
 Example:
 DELETE FROM CUSTOMERS WHERE AGE = 25;
 ROLLBACK;
 c. SAVEPOINT: It is used to roll the transaction
back to a certain point without rolling back the
entire transaction.
 Syntax:
 SAVEPOINT SAVEPOINT_NAME;

More Related Content

What's hot

introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ram Kedem
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
1keydata
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
Stewart Rogers
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
Chapter8 pl sql
Chapter8 pl sqlChapter8 pl sql
Chapter8 pl sql
Jafar Nesargi
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
Achmad Solichin
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
rahulrathore725
 
Plsql
PlsqlPlsql
Oracle Course
Oracle CourseOracle Course
Oracle Course
rspaike
 
Sql commands
Sql commandsSql commands
sql function(ppt)
sql function(ppt)sql function(ppt)
sql function(ppt)
Ankit Dubey
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
Ravikumar Nandigam
 
SQL-RDBMS Queries and Question Bank
SQL-RDBMS Queries and Question BankSQL-RDBMS Queries and Question Bank
SQL-RDBMS Queries and Question Bank
Md Mudassir
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
Syed Hassan Ali
 
User defined Function in SQL
User defined Function in SQLUser defined Function in SQL
Sql Tutorials
Sql TutorialsSql Tutorials
Sql Tutorials
Priyabrat Kar
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
Sankhya_Analytics
 

What's hot (20)

introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Chapter8 pl sql
Chapter8 pl sqlChapter8 pl sql
Chapter8 pl sql
 
Les08 (manipulating data)
Les08 (manipulating data)Les08 (manipulating data)
Les08 (manipulating data)
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 
Plsql
PlsqlPlsql
Plsql
 
Oracle Course
Oracle CourseOracle Course
Oracle Course
 
Sql commands
Sql commandsSql commands
Sql commands
 
sql function(ppt)
sql function(ppt)sql function(ppt)
sql function(ppt)
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
 
SQL-RDBMS Queries and Question Bank
SQL-RDBMS Queries and Question BankSQL-RDBMS Queries and Question Bank
SQL-RDBMS Queries and Question Bank
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
User defined Function in SQL
User defined Function in SQLUser defined Function in SQL
User defined Function in SQL
 
Sql Tutorials
Sql TutorialsSql Tutorials
Sql Tutorials
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 

Similar to SQL

Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
prathap kumar
 
Les08
Les08Les08
DML, DCL and TCL commands in SQL database.pptx
DML, DCL and TCL commands in SQL database.pptxDML, DCL and TCL commands in SQL database.pptx
DML, DCL and TCL commands in SQL database.pptx
PallaviPatil905338
 
Dbmsmanual
DbmsmanualDbmsmanual
Dbmsmanual
Sadhana Sreekanth
 
Ddl & dml commands
Ddl & dml commandsDdl & dml commands
Ddl & dml commands
AnjaliJain167
 
Les09
Les09Les09
ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docx
lakshmi77
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16
Thuan Nguyen
 
Lecture 4. MS SQL. DML Triggers
Lecture 4. MS SQL. DML TriggersLecture 4. MS SQL. DML Triggers
Lecture 4. MS SQL. DML Triggers
Alexey Furmanov
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
AnshumanDwivedi14
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
A. S. M. Shafi
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Subqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactionsSubqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactions
maxpane
 
SQL
SQLSQL
lecture13.ppt
lecture13.pptlecture13.ppt
lecture13.ppt
IrfanAkbar35
 
SQL Notes
SQL NotesSQL Notes
Less09 Data
Less09 DataLess09 Data
Less09 Data
vivaankumar
 
STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGESTRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE
SarithaDhanapal
 
Msql
Msql Msql
Msql
ksujitha
 

Similar to SQL (20)

Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
Les08
Les08Les08
Les08
 
DML, DCL and TCL commands in SQL database.pptx
DML, DCL and TCL commands in SQL database.pptxDML, DCL and TCL commands in SQL database.pptx
DML, DCL and TCL commands in SQL database.pptx
 
Dbmsmanual
DbmsmanualDbmsmanual
Dbmsmanual
 
Ddl & dml commands
Ddl & dml commandsDdl & dml commands
Ddl & dml commands
 
Les09
Les09Les09
Les09
 
ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docx
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
 
Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16
 
Lecture 4. MS SQL. DML Triggers
Lecture 4. MS SQL. DML TriggersLecture 4. MS SQL. DML Triggers
Lecture 4. MS SQL. DML Triggers
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
Trigger in DBMS
Trigger in DBMSTrigger in DBMS
Trigger in DBMS
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
Subqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactionsSubqueries views stored procedures_triggers_transactions
Subqueries views stored procedures_triggers_transactions
 
SQL
SQLSQL
SQL
 
lecture13.ppt
lecture13.pptlecture13.ppt
lecture13.ppt
 
SQL Notes
SQL NotesSQL Notes
SQL Notes
 
Less09 Data
Less09 DataLess09 Data
Less09 Data
 
STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGESTRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE
 
Msql
Msql Msql
Msql
 

More from Surkhab Shelly

2020 sd college- internet of everyhing
2020 sd college- internet of everyhing2020 sd college- internet of everyhing
2020 sd college- internet of everyhing
Surkhab Shelly
 
Intro to computer
Intro to computerIntro to computer
Intro to computer
Surkhab Shelly
 
Types of keys dbms
Types of keys dbmsTypes of keys dbms
Types of keys dbms
Surkhab Shelly
 
Architecture of dbms
Architecture of dbmsArchitecture of dbms
Architecture of dbms
Surkhab Shelly
 
Er model
Er modelEr model
Er model
Surkhab Shelly
 
Output devices
Output devicesOutput devices
Output devices
Surkhab Shelly
 
Types of secondary storage devices ppt
Types of secondary storage devices pptTypes of secondary storage devices ppt
Types of secondary storage devices ppt
Surkhab Shelly
 
Input devices
Input devicesInput devices
Input devices
Surkhab Shelly
 
FUNCTIONAL UNIT
FUNCTIONAL UNITFUNCTIONAL UNIT
FUNCTIONAL UNIT
Surkhab Shelly
 
TYPES OF MEMORY
TYPES OF MEMORYTYPES OF MEMORY
TYPES OF MEMORY
Surkhab Shelly
 
cyber crime
 cyber crime cyber crime
cyber crime
Surkhab Shelly
 
Fun ppt
Fun pptFun ppt
Dbms
DbmsDbms
Avl tree ppt
Avl tree pptAvl tree ppt
Avl tree ppt
Surkhab Shelly
 
7 foods-to-keep you healthy
7 foods-to-keep  you healthy7 foods-to-keep  you healthy
7 foods-to-keep you healthy
Surkhab Shelly
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
Surkhab Shelly
 

More from Surkhab Shelly (16)

2020 sd college- internet of everyhing
2020 sd college- internet of everyhing2020 sd college- internet of everyhing
2020 sd college- internet of everyhing
 
Intro to computer
Intro to computerIntro to computer
Intro to computer
 
Types of keys dbms
Types of keys dbmsTypes of keys dbms
Types of keys dbms
 
Architecture of dbms
Architecture of dbmsArchitecture of dbms
Architecture of dbms
 
Er model
Er modelEr model
Er model
 
Output devices
Output devicesOutput devices
Output devices
 
Types of secondary storage devices ppt
Types of secondary storage devices pptTypes of secondary storage devices ppt
Types of secondary storage devices ppt
 
Input devices
Input devicesInput devices
Input devices
 
FUNCTIONAL UNIT
FUNCTIONAL UNITFUNCTIONAL UNIT
FUNCTIONAL UNIT
 
TYPES OF MEMORY
TYPES OF MEMORYTYPES OF MEMORY
TYPES OF MEMORY
 
cyber crime
 cyber crime cyber crime
cyber crime
 
Fun ppt
Fun pptFun ppt
Fun ppt
 
Dbms
DbmsDbms
Dbms
 
Avl tree ppt
Avl tree pptAvl tree ppt
Avl tree ppt
 
7 foods-to-keep you healthy
7 foods-to-keep  you healthy7 foods-to-keep  you healthy
7 foods-to-keep you healthy
 
Dbms ppt
Dbms pptDbms ppt
Dbms ppt
 

Recently uploaded

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 

Recently uploaded (20)

14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 

SQL

  • 1. PRESENTED BY:- Mrs. Surkhab Shelly Assistant Professor In CS
  • 2.  DML commands are used to modify the database. It is responsible for all form of changes in the database.  The command of DML is not auto-committed that means it can't permanently save all the changes in the database. They can be rollback.
  • 3.  This statement is used to insert new records into the table.  INSERT INTO Employee (EmployeeID, EmployeeName, PhoneNumber, Address, City, Country) VALUES ('06', 'Sanjana', '9921321141', 'Camel Street House No 12', 'Chennai', 'India');  INSERT INTO Employee VALUES ('07', 'Sayantini', '9934567654', 'Nice Road 21', 'Pune', 'India');
  • 4.  This statement is used to modify the records already present in the table.  UPDATE Employee SET EmployeeName = 'Aahana', City= 'Ahmedabad' WHERE EmployeeID = 1; OR  UPDATE Employee SET EmployeeName = 'Aahana', City= 'Ahmedabad‘;
  • 5.  This statement is used to delete the existing DELETE FROM Employee WHERE EmployeeName='Preeti';
  • 6.  This statement is used to select data from a database and the data returned is stored in a result table, called the result-set. 1)SELECT EmployeeID, EmployeeName FROM Employee;  --(*) is used to select all from the table. 2)SELECT * FROM Employee;
  • 7.  DCL commands are used to grant and take back authority from any database user.  Here are some commands that come under DCL:  Grant  Revoke
  • 8.  Grant: It is used to give user access privileges to a database.  Example GRANT SELECT, UPDATE ON EMPLOYEE TO USER1, USER2;  Revoke: It is used to take back permissions from the user.  Example REVOKE SELECT, UPDATE ON EMPLOYEE FROM USER1, USER2;
  • 9.  TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.  These operations are automatically committed in the database that's why they cannot be used while creating tables or dropping them.  Here are some commands that come under TCL:  COMMIT  ROLLBACK  SAVEPOINT  a. Commit: Commit command is used to save all the transactions to the database.  Syntax:  COMMIT;  Example: DELETE FROM CUSTOMERS WHERE AGE = 25; COMMIT;
  • 10.  b. Rollback: Rollback command is used to undo transactions that have not already been saved to the database.  Syntax:  ROLLBACK;  Example:  DELETE FROM CUSTOMERS WHERE AGE = 25;  ROLLBACK;  c. SAVEPOINT: It is used to roll the transaction back to a certain point without rolling back the entire transaction.  Syntax:  SAVEPOINT SAVEPOINT_NAME;