SlideShare ist ein Scribd-Unternehmen logo
1 von 8
1 Using ORACLE® Data Manipulation Language (Populating our sample database)   and Transaction Control Language
2 DATA DEFINATION LANGUAGE DML is used for manipulation the data contained in a table. Just as how DDL commands can be used to CREATE,ALTER and DROP objects DML can be used to INSERT , UPDATE and DELETE data from the objects.DML commands only affect the data and not the structure of the table. DML contains 3 commands: INSERT 	: Used to insert a new record into the table. UPDATE	: Used to update the records already inserted into the table. DELETE 	: Used to delete records already inserted into the table.
3 INSERT COMAND The INSERT command is used to insert records into the table. The basic syntax of the INSERT command is : INSERT INTO TABLE_NAME(colm1_name,…[colmn_name])       VALUES ( colm1_val,…[colmn_val]); EXAMPLE :  INSERT INTO InfoTable(name,age,phone) VALUES (‘steve’,50,9988776655); The above syntax is used when we only want to insert specified column values.If we are inserting a row containing all the columns value or intend to insert NULL values in remaining columns we can discard the column list after table name as: INSERT INTO TABLE_NAME VALUES(value…[value]..[NULL]); The NULL keyword is used to insert a null values into the column.
4 UPDATE COMAND The UPDATE command is used to modify the records that have been already inserted into the table. We use a WHERE clause to target a particular set of columns to be updated in absence of which all rows in the table will be updated. SYNTAX: UPDATE  TABLE_NAME SET	 column = new_value,….	We can update multiple columns at a time.              …..[column = new value] WHERE    	 [condition ….];		WHERE condition limits the rows being updated. EXAMPLE : UPDATE InfoTable  SET	age = 40 , 	phone = 9988000000 WHERE 	name = ‘steve’;
5 UPDATE USING SUBQUERIES We can update the value of a row to be set to values of another row using subqueries : SYNTAX: UPDATE TABLE_NAME SET 	column = [subquery]…             …..column = value WHERE 	(condition); EXAMPLE : UPDATE InfoTable SET 	phone= (SELECT phone FROM InfoTable  WHERE name = ‘bill’) WHERE	age = 40;
6 DELETE COMAND The DELECT command can be used to delete a set of records that are inserted in a column. A WHERE clause is used to narrow the set of rows to be deleted in absence of which all the rows in the table will be deleted. To delete all rows we can also use the TRUNCATE command. SYNTAX: DELETE  [FROM] TABLE_NAME WHERE (condition..); EXAMPLE: DELETE FROM InfoTable WHERE name = ‘bill’; DELETE FROM InfoTable;Entire table contents deleted
7 TRANSACTION CONTROL LANGUAGE A TRANSACTION is a set of DML statements that cause a consistent change on data or it can be a single DDL / DCL command . The transaction begins when a DML command is entered and ends when COMMIT or ROLLBACK occurs. Since DCL and DDL commands are committed as soon as been entered only 1 such command is in a transaction. TCL statements are used to control transactions. There are three TL commands:
THANK YOU 8 THANK YOU FOR VIEWING THIS PRESENTATION FOR MORE PRESENTATIONS AND VIDEOS ON ORACLE AND DATAMINING , please visit:   www.dataminingtools.net

Weitere ähnliche Inhalte

Was ist angesagt?

DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
Ashwin Dinoriya
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
Belle Wx
 
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
Vivek Singh
 

Was ist angesagt? (19)

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
 
8. sql
8. sql8. sql
8. sql
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
 
Sql commands
Sql commandsSql commands
Sql commands
 
Ddl commands
Ddl commandsDdl commands
Ddl commands
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
Oracle Database DML DDL and TCL
Oracle Database DML DDL and TCL Oracle Database DML DDL and TCL
Oracle Database DML DDL and TCL
 
SQL DDL
SQL DDLSQL DDL
SQL DDL
 
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
 
Oracle SQL DML Statements
Oracle SQL DML StatementsOracle SQL DML Statements
Oracle SQL DML Statements
 
Database Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and deleteDatabase Management - Lecture 2 - SQL select, insert, update and delete
Database Management - Lecture 2 - SQL select, insert, update and delete
 
Sql DML
Sql DMLSql DML
Sql DML
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
SQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERESQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERE
 
Database Systems - SQL - DDL Statements (Chapter 3/2)
Database Systems - SQL - DDL Statements (Chapter 3/2)Database Systems - SQL - DDL Statements (Chapter 3/2)
Database Systems - SQL - DDL Statements (Chapter 3/2)
 
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Les10 Creating And Managing Tables
 
Les11 Including Constraints
Les11 Including ConstraintsLes11 Including Constraints
Les11 Including Constraints
 
SQL Views
SQL ViewsSQL Views
SQL Views
 

Ähnlich wie Oracle : DML

ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docx
lakshmi77
 

Ähnlich wie Oracle : DML (20)

Commands
CommandsCommands
Commands
 
Oracle naveen Sql
Oracle naveen   SqlOracle naveen   Sql
Oracle naveen Sql
 
Oracle naveen Sql
Oracle naveen   SqlOracle naveen   Sql
Oracle naveen Sql
 
SQL
SQLSQL
SQL
 
ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docx
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for Beginners
 
My SQL.pptx
My SQL.pptxMy SQL.pptx
My SQL.pptx
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
 
DBMS.pdf
DBMS.pdfDBMS.pdf
DBMS.pdf
 
Oracle SQL AND PL/SQL
Oracle SQL AND PL/SQLOracle SQL AND PL/SQL
Oracle SQL AND PL/SQL
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
 
Msql query
Msql queryMsql query
Msql query
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
Sql
SqlSql
Sql
 
Oracle: Commands
Oracle: CommandsOracle: Commands
Oracle: Commands
 
1670595076250.pdf
1670595076250.pdf1670595076250.pdf
1670595076250.pdf
 
Cheat sheet SQL commands with examples and easy understanding
Cheat sheet SQL commands with examples and easy understandingCheat sheet SQL commands with examples and easy understanding
Cheat sheet SQL commands with examples and easy understanding
 
SQL 🌟🌟🔥.pdf
SQL 🌟🌟🔥.pdfSQL 🌟🌟🔥.pdf
SQL 🌟🌟🔥.pdf
 

Mehr von oracle content (12)

Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
 
Oracle: PLSQL Introduction
Oracle: PLSQL IntroductionOracle: PLSQL Introduction
Oracle: PLSQL Introduction
 
Oracle: Programs
Oracle: ProgramsOracle: Programs
Oracle: Programs
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Oracle:Cursors
Oracle:CursorsOracle:Cursors
Oracle:Cursors
 
Oracle: Control Structures
Oracle:  Control StructuresOracle:  Control Structures
Oracle: Control Structures
 
Oracle: Dw Design
Oracle: Dw DesignOracle: Dw Design
Oracle: Dw Design
 
Oracle: Basic SQL
Oracle: Basic SQLOracle: Basic SQL
Oracle: Basic SQL
 
Oracle Warehouse
Oracle WarehouseOracle Warehouse
Oracle Warehouse
 
Oracle: Functions
Oracle: FunctionsOracle: Functions
Oracle: Functions
 
Oracle: New Plsql
Oracle: New PlsqlOracle: New Plsql
Oracle: New Plsql
 
Oracle: Fundamental Of Dw
Oracle: Fundamental Of DwOracle: Fundamental Of Dw
Oracle: Fundamental Of Dw
 

Kürzlich hochgeladen

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Kürzlich hochgeladen (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 

Oracle : DML

  • 1. 1 Using ORACLE® Data Manipulation Language (Populating our sample database) and Transaction Control Language
  • 2. 2 DATA DEFINATION LANGUAGE DML is used for manipulation the data contained in a table. Just as how DDL commands can be used to CREATE,ALTER and DROP objects DML can be used to INSERT , UPDATE and DELETE data from the objects.DML commands only affect the data and not the structure of the table. DML contains 3 commands: INSERT : Used to insert a new record into the table. UPDATE : Used to update the records already inserted into the table. DELETE : Used to delete records already inserted into the table.
  • 3. 3 INSERT COMAND The INSERT command is used to insert records into the table. The basic syntax of the INSERT command is : INSERT INTO TABLE_NAME(colm1_name,…[colmn_name]) VALUES ( colm1_val,…[colmn_val]); EXAMPLE : INSERT INTO InfoTable(name,age,phone) VALUES (‘steve’,50,9988776655); The above syntax is used when we only want to insert specified column values.If we are inserting a row containing all the columns value or intend to insert NULL values in remaining columns we can discard the column list after table name as: INSERT INTO TABLE_NAME VALUES(value…[value]..[NULL]); The NULL keyword is used to insert a null values into the column.
  • 4. 4 UPDATE COMAND The UPDATE command is used to modify the records that have been already inserted into the table. We use a WHERE clause to target a particular set of columns to be updated in absence of which all rows in the table will be updated. SYNTAX: UPDATE TABLE_NAME SET column = new_value,…. We can update multiple columns at a time. …..[column = new value] WHERE [condition ….]; WHERE condition limits the rows being updated. EXAMPLE : UPDATE InfoTable SET age = 40 , phone = 9988000000 WHERE name = ‘steve’;
  • 5. 5 UPDATE USING SUBQUERIES We can update the value of a row to be set to values of another row using subqueries : SYNTAX: UPDATE TABLE_NAME SET column = [subquery]… …..column = value WHERE (condition); EXAMPLE : UPDATE InfoTable SET phone= (SELECT phone FROM InfoTable WHERE name = ‘bill’) WHERE age = 40;
  • 6. 6 DELETE COMAND The DELECT command can be used to delete a set of records that are inserted in a column. A WHERE clause is used to narrow the set of rows to be deleted in absence of which all the rows in the table will be deleted. To delete all rows we can also use the TRUNCATE command. SYNTAX: DELETE [FROM] TABLE_NAME WHERE (condition..); EXAMPLE: DELETE FROM InfoTable WHERE name = ‘bill’; DELETE FROM InfoTable;Entire table contents deleted
  • 7. 7 TRANSACTION CONTROL LANGUAGE A TRANSACTION is a set of DML statements that cause a consistent change on data or it can be a single DDL / DCL command . The transaction begins when a DML command is entered and ends when COMMIT or ROLLBACK occurs. Since DCL and DDL commands are committed as soon as been entered only 1 such command is in a transaction. TCL statements are used to control transactions. There are three TL commands:
  • 8. THANK YOU 8 THANK YOU FOR VIEWING THIS PRESENTATION FOR MORE PRESENTATIONS AND VIDEOS ON ORACLE AND DATAMINING , please visit: www.dataminingtools.net