SlideShare ist ein Scribd-Unternehmen logo
1 von 54
Manipulating Data
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Manipulation Language ,[object Object],[object Object],[object Object],[object Object],[object Object]
Adding a New Row to a Table DEPARTMENTS  New  row … insert a new row into the  DEPARMENTS  table…
The  INSERT  Statement Syntax ,[object Object],[object Object],INSERT INTO table  [( column  [ , column... ])] VALUES (value  [ , value... ]);
Inserting New Rows ,[object Object],[object Object],[object Object],[object Object],INSERT INTO departments(department_id, department_name,  manager_id, location_id) VALUES  (70, 'Public Relations', 100, 1700); 1 row created.
Inserting Rows with Null Values ,[object Object],INSERT INTO departments VALUES (100, 'Finance', NULL, NULL); 1 row created. INSERT INTO departments (department_id,  department_name  ) VALUES (30, 'Purchasing'); 1 row created. ,[object Object]
Inserting Special Values ,[object Object],[object Object],INSERT INTO employees (employee_id,  first_name, last_name,  email, phone_number, hire_date, job_id, salary,  commission_pct, manager_id, department_id) VALUES   (113,  'Louis', 'Popp',  'LPOPP', '515.124.4567',  SYSDATE, 'AC_ACCOUNT', 6900,  NULL, 205, 100); 1 row created.
Inserting Specific Date Values ,[object Object],[object Object],INSERT INTO employees VALUES  (114,  'Den', 'Raphealy',  'DRAPHEAL', '515.127.4561', TO_DATE('FEB 3, 1999', 'MON DD, YYYY'), 'AC_ACCOUNT', 11000, NULL, 100, 30); 1 row created.
Creating a Script  ,[object Object],[object Object],INSERT INTO departments  (department_id, department_name, location_id) VALUES  (&department_id, '&department_name',&location); 1 row created.
[object Object],[object Object],[object Object],Copying Rows  from Another Table INSERT INTO sales_reps(id, name, salary, commission_pct) SELECT employee_id, last_name, salary, commission_pct FROM  employees WHERE  job_id LIKE '%REP%'; 4 rows created.
Changing Data in a Table EMPLOYEES Update rows in the  EMPLOYEES  table.
The  UPDATE  Statement Syntax ,[object Object],[object Object],UPDATE table SET column  =  value  [,  column  =  value, ... ] [WHERE  condition ];
[object Object],[object Object],Updating Rows in a Table UPDATE employees SET  department_id = 70 WHERE  employee_id = 113; 1 row updated. UPDATE  copy_emp SET  department_id = 110; 22 rows updated.
Updating Two Columns with a Subquery ,[object Object],[object Object],UPDATE  employees SET  job_id  = (SELECT  job_id  FROM  employees  WHERE  employee_id = 205),  salary  = (SELECT  salary  FROM  employees  WHERE  employee_id = 205)  WHERE  employee_id  =  114; 1 row updated.
Updating Rows Based  on Another Table ,[object Object],[object Object],UPDATE  copy_emp SET  department_id  =  (SELECT department_id FROM employees WHERE employee_id = 100) WHERE  job_id  =  (SELECT job_id FROM employees WHERE employee_id = 200); 1 row updated.
Updating Rows:  Integrity Constraint Error ,[object Object],UPDATE employees * ERROR at line 1: ORA-02291: integrity constraint (HR.EMP_DEPT_FK) violated - parent key not found UPDATE employees SET  department_id = 55 WHERE  department_id = 110;
Removing a Row from a Table  Delete a row from the  DEPARTMENTS  table. DEPARTMENTS
The  DELETE  Statement ,[object Object],[object Object],DELETE [FROM]   table [WHERE   condition ];
[object Object],[object Object],Deleting Rows from a Table DELETE FROM departments WHERE  department_name = 'Finance'; 1 row deleted. DELETE FROM  copy_emp; 22 rows deleted.
Deleting Rows Based  on Another Table ,[object Object],[object Object],DELETE FROM employees WHERE  department_id = (SELECT department_id FROM  departments WHERE  department_name LIKE '%Public%'); 1 row deleted.
Deleting Rows:  Integrity Constraint Error ,[object Object],DELETE FROM departments WHERE  department_id = 60; DELETE FROM departments * ERROR at line 1: ORA-02292: integrity constraint (HR.EMP_DEPT_FK) violated - child record found
Using a Subquery in an  INSERT  Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using a Subquery in an  INSERT  Statement ,[object Object],SELECT employee_id, last_name, email, hire_date,  job_id, salary, department_id FROM  employees WHERE  department_id = 50;
Using the  WITH CHECK OPTION  Keyword on DML Statements ,[object Object],[object Object],INSERT INTO  (SELECT employee_id, last_name, email, hire_date, job_id, salary FROM  employees  WHERE  department_id = 50  WITH CHECK OPTION ) VALUES (99998, 'Smith', 'JSMITH', TO_DATE('07-JUN-99', 'DD-MON-RR'),  'ST_CLERK', 5000); INSERT INTO * ERROR at line 1: ORA-01402: view WITH CHECK OPTION where-clause violation
Overview of the Explicit Default Feature ,[object Object],[object Object],[object Object],[object Object]
Using Explicit Default Values ,[object Object],[object Object],INSERT INTO departments (department_id, department_name, manager_id)  VALUES (300, 'Engineering',  DEFAULT ); UPDATE departments  SET manager_id =  DEFAULT  WHERE department_id = 10;
The  MERGE  Statement ,[object Object],[object Object],[object Object],[object Object],[object Object]
The  MERGE  Statement Syntax ,[object Object],[object Object],MERGE INTO  table_name   table_alias USING ( table|view|sub_query )  alias ON ( join condition ) WHEN MATCHED THEN UPDATE SET  col1 = col_val1, col2 = col2_val WHEN NOT MATCHED THEN INSERT ( column_list ) VALUES ( column_values );
Merging Rows ,[object Object],[object Object],MERGE INTO copy_emp  c USING employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET c.first_name  = e.first_name, c.last_name  = e.last_name, ... c.department_id  = e.department_id WHEN NOT MATCHED THEN INSERT VALUES(e.employee_id, e.first_name, e.last_name, e.email, e.phone_number, e.hire_date, e.job_id, e.salary, e.commission_pct, e.manager_id,  e.department_id);
Merging Rows MERGE INTO copy_emp c USING employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET ... WHEN NOT MATCHED THEN INSERT VALUES...; SELECT *  FROM COPY_EMP; no rows selected SELECT *  FROM COPY_EMP; 20 rows selected.
Database Transactions ,[object Object],[object Object],[object Object],[object Object],[object Object]
Database Transactions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Advantages of  COMMIT   and  ROLLBACK  Statements ,[object Object],[object Object],[object Object],[object Object]
Controlling Transactions ROLLBACK  to SAVEPOINT B ROLLBACK  to SAVEPOINT A ROLLBACK SAVEPOINT B SAVEPOINT A DELETE INSERT UPDATE INSERT COMMIT Time Transaction
Rolling Back Changes  to a Marker ,[object Object],[object Object],UPDATE... SAVEPOINT update_done; Savepoint created. INSERT... ROLLBACK TO update_done; Rollback complete.
[object Object],[object Object],[object Object],[object Object],[object Object],Implicit Transaction Processing
State of the Data  Before  COMMIT  or  ROLLBACK ,[object Object],[object Object],[object Object],[object Object]
State of the Data after  COMMIT ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],Committing Data COMMIT; Commit complete. DELETE FROM employees WHERE  employee_id = 99999; 1 row deleted. INSERT INTO departments  VALUES (290, 'Corporate Tax', NULL, 1700); 1 row inserted.
State of the Data After ROLLBACK ,[object Object],[object Object],[object Object],[object Object],[object Object],DELETE FROM copy_emp; 22 rows deleted. ROLLBACK; Rollback complete.
Statement-Level Rollback ,[object Object],[object Object],[object Object],[object Object]
Read Consistency ,[object Object],[object Object],[object Object],[object Object],[object Object]
Implementation of Read Consistency SELECT  * FROM userA.employees; UPDATE employees SET  salary = 7000 WHERE  last_name = 'Goyal'; Data blocks Rollback segments changed and  unchanged data before change “old” data User A User B Read consistent image
Locking ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Implicit Locking ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary Description Adds a new row to the table Modifies existing rows in the table Removes existing rows from the table Conditionally inserts or updates data in a table Makes all pending changes permanent Is used to rollback to the savepoint marker Discards all pending data changes Statement INSERT UPDATE DELETE MERGE COMMIT SAVEPOINT ROLLBACK In this lesson, you should have learned how to use DML statements and control transactions.
Practice 8 Overview ,[object Object],[object Object],[object Object],[object Object]
 
 
 
 
Read Consistency Example Output  Time  Session 1  Session 2 t1 t2 t3 t4 t5 SELECT salary FROM employees WHERE  last_name='King'; 24000 UPDATE employees SET  salary=salary+10000 WHERE  last_name='King'; 24000 COMMIT; 34000 SELECT salary FROM employees WHERE  last_name='King'; SELECT salary FROM employees WHERE  last_name='King';
 

Weitere ähnliche Inhalte

Was ist angesagt?

Sql server ___________session 3(sql 2008)
Sql server  ___________session 3(sql 2008)Sql server  ___________session 3(sql 2008)
Sql server ___________session 3(sql 2008)Ehtisham Ali
 
Intro to tsql unit 9
Intro to tsql   unit 9Intro to tsql   unit 9
Intro to tsql unit 9Syed Asrarali
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Achmad Solichin
 
Introduction to oracle functions
Introduction to oracle functionsIntroduction to oracle functions
Introduction to oracle functionsNitesh Singh
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functionssinhacp
 
Les02 (restricting and sorting data)
Les02 (restricting and sorting data)Les02 (restricting and sorting data)
Les02 (restricting and sorting data)Achmad Solichin
 
Manipulating Data Oracle Data base
Manipulating Data Oracle Data baseManipulating Data Oracle Data base
Manipulating Data Oracle Data baseSalman Memon
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive dataAmrit Kaur
 
Nested Queries Lecture
Nested Queries LectureNested Queries Lecture
Nested Queries LectureFelipe Costa
 

Was ist angesagt? (20)

Les20
Les20Les20
Les20
 
Sql server ___________session 3(sql 2008)
Sql server  ___________session 3(sql 2008)Sql server  ___________session 3(sql 2008)
Sql server ___________session 3(sql 2008)
 
Intro to tsql unit 9
Intro to tsql   unit 9Intro to tsql   unit 9
Intro to tsql unit 9
 
Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)Les09 (using ddl statements to create and manage tables)
Les09 (using ddl statements to create and manage tables)
 
Manipulating data
Manipulating dataManipulating data
Manipulating data
 
Introduction to oracle functions
Introduction to oracle functionsIntroduction to oracle functions
Introduction to oracle functions
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functions
 
Module03
Module03Module03
Module03
 
Les02
Les02Les02
Les02
 
Les02 (restricting and sorting data)
Les02 (restricting and sorting data)Les02 (restricting and sorting data)
Les02 (restricting and sorting data)
 
Manipulating Data Oracle Data base
Manipulating Data Oracle Data baseManipulating Data Oracle Data base
Manipulating Data Oracle Data base
 
Les04
Les04Les04
Les04
 
SQL
SQLSQL
SQL
 
Sql
SqlSql
Sql
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive data
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Les11
Les11Les11
Les11
 
Les04
Les04Les04
Les04
 
Nested Queries Lecture
Nested Queries LectureNested Queries Lecture
Nested Queries Lecture
 
Oracle SQL Advanced
Oracle SQL AdvancedOracle SQL Advanced
Oracle SQL Advanced
 

Andere mochten auch

DLM knowledge-sharing
DLM knowledge-sharingDLM knowledge-sharing
DLM knowledge-sharingEric Ren
 
5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data WarehousingTeradata
 
SAP BO and Teradata best practices
SAP BO and Teradata best practicesSAP BO and Teradata best practices
SAP BO and Teradata best practicesDmitry Anoshin
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureMohammad Tahoon
 
Teradata introduction
Teradata introductionTeradata introduction
Teradata introductionRameejmd
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksBigClasses Com
 
Teradata vs-exadata
Teradata vs-exadataTeradata vs-exadata
Teradata vs-exadataLouis liu
 

Andere mochten auch (7)

DLM knowledge-sharing
DLM knowledge-sharingDLM knowledge-sharing
DLM knowledge-sharing
 
5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing5 Years of Progress in Active Data Warehousing
5 Years of Progress in Active Data Warehousing
 
SAP BO and Teradata best practices
SAP BO and Teradata best practicesSAP BO and Teradata best practices
SAP BO and Teradata best practices
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system Architecture
 
Teradata introduction
Teradata introductionTeradata introduction
Teradata introduction
 
Introduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata WorksIntroduction to Teradata And How Teradata Works
Introduction to Teradata And How Teradata Works
 
Teradata vs-exadata
Teradata vs-exadataTeradata vs-exadata
Teradata vs-exadata
 

Ähnlich wie Les08 (20)

e computer notes - Manipulating data
e computer notes - Manipulating datae computer notes - Manipulating data
e computer notes - Manipulating data
 
Les06
Les06Les06
Les06
 
Les09
Les09Les09
Les09
 
Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)
 
DOODB_LAB.pptx
DOODB_LAB.pptxDOODB_LAB.pptx
DOODB_LAB.pptx
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Sql modifying data - MYSQL part I
Sql modifying data - MYSQL part ISql modifying data - MYSQL part I
Sql modifying data - MYSQL part I
 
2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used2. DBMS Experiment - Lab 2 Made in SQL Used
2. DBMS Experiment - Lab 2 Made in SQL Used
 
Basic SQL Statments
Basic SQL StatmentsBasic SQL Statments
Basic SQL Statments
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
 
Les09.ppt
Les09.pptLes09.ppt
Les09.ppt
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
 
SQL Query
SQL QuerySQL Query
SQL Query
 
Sql dml & tcl 2
Sql   dml & tcl 2Sql   dml & tcl 2
Sql dml & tcl 2
 
Assignment#02
Assignment#02Assignment#02
Assignment#02
 
Sql DML
Sql DMLSql DML
Sql DML
 
Sql DML
Sql DMLSql DML
Sql DML
 
0808.pdf
0808.pdf0808.pdf
0808.pdf
 
0808.pdf
0808.pdf0808.pdf
0808.pdf
 
Oracle - Program with PL/SQL - Lession 03
Oracle - Program with PL/SQL - Lession 03Oracle - Program with PL/SQL - Lession 03
Oracle - Program with PL/SQL - Lession 03
 

Mehr von Vijay Kumar (14)

Les19
Les19Les19
Les19
 
Les15
Les15Les15
Les15
 
Les16
Les16Les16
Les16
 
Les14
Les14Les14
Les14
 
Les13
Les13Les13
Les13
 
Les12
Les12Les12
Les12
 
Les10
Les10Les10
Les10
 
Les07
Les07Les07
Les07
 
Les09
Les09Les09
Les09
 
Les06
Les06Les06
Les06
 
Les05
Les05Les05
Les05
 
Les04
Les04Les04
Les04
 
Les03
Les03Les03
Les03
 
Les02
Les02Les02
Les02
 

Kürzlich hochgeladen

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Les08

  • 2.
  • 3.
  • 4. Adding a New Row to a Table DEPARTMENTS New row … insert a new row into the DEPARMENTS table…
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Changing Data in a Table EMPLOYEES Update rows in the EMPLOYEES table.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Removing a Row from a Table Delete a row from the DEPARTMENTS table. DEPARTMENTS
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Merging Rows MERGE INTO copy_emp c USING employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET ... WHEN NOT MATCHED THEN INSERT VALUES...; SELECT * FROM COPY_EMP; no rows selected SELECT * FROM COPY_EMP; 20 rows selected.
  • 32.
  • 33.
  • 34.
  • 35. Controlling Transactions ROLLBACK to SAVEPOINT B ROLLBACK to SAVEPOINT A ROLLBACK SAVEPOINT B SAVEPOINT A DELETE INSERT UPDATE INSERT COMMIT Time Transaction
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. Implementation of Read Consistency SELECT * FROM userA.employees; UPDATE employees SET salary = 7000 WHERE last_name = 'Goyal'; Data blocks Rollback segments changed and unchanged data before change “old” data User A User B Read consistent image
  • 45.
  • 46.
  • 47. Summary Description Adds a new row to the table Modifies existing rows in the table Removes existing rows from the table Conditionally inserts or updates data in a table Makes all pending changes permanent Is used to rollback to the savepoint marker Discards all pending data changes Statement INSERT UPDATE DELETE MERGE COMMIT SAVEPOINT ROLLBACK In this lesson, you should have learned how to use DML statements and control transactions.
  • 48.
  • 49.  
  • 50.  
  • 51.  
  • 52.  
  • 53. Read Consistency Example Output Time Session 1 Session 2 t1 t2 t3 t4 t5 SELECT salary FROM employees WHERE last_name='King'; 24000 UPDATE employees SET salary=salary+10000 WHERE last_name='King'; 24000 COMMIT; 34000 SELECT salary FROM employees WHERE last_name='King'; SELECT salary FROM employees WHERE last_name='King';
  • 54.  

Hinweis der Redaktion

  1. Schedule: Timing Topic 60 minutes Lecture 30 minutes Practice 90 minutes Total