SlideShare ist ein Scribd-Unternehmen logo
1 von 11
1 Using ORACLE® MANIPULATING DATA using PL/SQL
2 COMMENTING CODE We can add comments to the PL/SQL .There are two types of comments: EXAMPLE: 	DECLARE eage NUMBER ;	       --This is a single line comment . number variable defined. 	BEGIN 	SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’;	/* A multiline 			command .Here the select command is defined */ 	END
3 FUNCTIONS The functions available in SQL can be used in PL/SQL code. Not all SQL function can be used in PL/SQL statements .The SQL functions unavailable in Pl/SQL statements are: DECODE function. All GROUP functions except the LEAST and GREATEST. EXAMPLE1: ename  VARCHAR2(20) := INITCAP(‘bill’); 	--stores Bill in the variable ename. We can use data type conversion function in PL/SQL statements. EXAMPLE 2: mainphone NUMBER(10) := 9000000000; ename VARCHAR2(20); BEGIN SELECT name INTO ename FROM InfoTable WHERE phone = TO_NUMBER(mainphone); END
4 Operators in PL/SQL
5 Operators EXAMPLES: profit BOOL;	sp NUMBER;	cp NUMBER; BEGIN cp:= 1000; sp:= 1200; profit := ((sp – cp) > 100);      -- finding if profit was above 100 or not END
6 RETRIEVING DATA  We can retrieve data using the SELECT command. Variables are used to store the values returned from the SELECT statement and hence have to be of the same datatype and be declared before use. SYNTAX: SELECT column, […column]  INTO  variable_name,[…variable_name] FROM table_name WHERE { expression….}; EXAMPLE: DECLARE eage NUMBER; 		BEGIN 		SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’; 	DBMS_OUTPUT.PUT_LINE(‘ Age of bill is : ‘ || eage); 		END
7 INSERT command We can insert data into tables using the PL/SQL INSERT command. SYNTAX: INSERT INTO table_name (column , (…..column)) VALUES (value , (…..value)); EXAMPLE: BEGIN 		INSERT INTO InfoTable 		(name,age,phone) 		VALUES 		(‘micheal’,45,9666002203); 		END
8 UPDATE command We can update data in tables using the PL/SQL UPDATE comand. SYNTAX: UPDATE table_name SET 	column = value,  	(…column = value); WHERE	{expression }; EXAMPLE:	DECLARE eage NUMBER(5):=40; 		BEGIN 		UPDATE InfoTable SET age = eage 		WHERE name =  ‘micheal’; 		END
9 DELETE command We can delete data from tables using the PL/SQL DELETE comand. SYNTAX: DELETE  FROM table_name WHERE  { expression }; EXAMPLE: BEGIN 		DELETE  FROM InfoTable 		WHERE  age = 45 ; 		END
10 MERGE COMMAND The MERGE comand is use to merge the data of one table into the data of another table.The merge command updates or inserts rows in order to make data in both rows similar. DECLARE ename INFOTABLE.NAME%TYPE := ‘bill'; BEGIN 	MERGE INTO addtable a      	USING infotable I					Infotable      	ON (i.name =ename)				    	WHEN MATCHED THEN      	UPDATE SET a.phone = i.phoneADDtable    	WHEN NOT MATCHED THEN      	INSERT VALUES(i.name,NULL,i.phone);		 END; ADDtable after MERGE
THANK YOU 11 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?

My sql Syntax
My sql SyntaxMy sql Syntax
My sql SyntaxReka
 
Prabu's sql quries
Prabu's sql quries Prabu's sql quries
Prabu's sql quries Prabu Cse
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsAshwin Dinoriya
 
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)Vidyasagar Mundroy
 
Oracle Training in Kochi | Trivandrum |Thrissur
Oracle Training in Kochi | Trivandrum |ThrissurOracle Training in Kochi | Trivandrum |Thrissur
Oracle Training in Kochi | Trivandrum |ThrissurIndiaOptions Softwares
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL) Mohd Tousif
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commandsBelle Wx
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference CardTechcanvass
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL CommandsShrija Madhu
 

Was ist angesagt? (18)

Les10
Les10Les10
Les10
 
Les09
Les09Les09
Les09
 
My sql Syntax
My sql SyntaxMy sql Syntax
My sql Syntax
 
Prabu's sql quries
Prabu's sql quries Prabu's sql quries
Prabu's sql quries
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
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)
 
Oracle Training in Kochi | Trivandrum |Thrissur
Oracle Training in Kochi | Trivandrum |ThrissurOracle Training in Kochi | Trivandrum |Thrissur
Oracle Training in Kochi | Trivandrum |Thrissur
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
 
Les12
Les12Les12
Les12
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference Card
 
Les14
Les14Les14
Les14
 
Commands of DML in SQL
Commands of DML in SQLCommands of DML in SQL
Commands of DML in SQL
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
Learn plsql
Learn plsqlLearn plsql
Learn plsql
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
Les02
Les02Les02
Les02
 

Andere mochten auch

بطاقة وصف تسويق
بطاقة وصف تسويقبطاقة وصف تسويق
بطاقة وصف تسويقAsma Al-khaldi
 
Vitaminas Crescer Com SaúDe
Vitaminas   Crescer Com SaúDeVitaminas   Crescer Com SaúDe
Vitaminas Crescer Com SaúDeMedusa Fabula
 
Projecto Jornalismo
Projecto JornalismoProjecto Jornalismo
Projecto Jornalismoguestf8ccf75
 
Derric social media-tactics-gmc
Derric social media-tactics-gmcDerric social media-tactics-gmc
Derric social media-tactics-gmcVasil Azarov
 
الوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاءالوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاءثامر عبدالله
 
사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1Han Woo PARK
 
Ayurvedic Treatment For Premature Ejaculation To Increase Sex Duration
Ayurvedic Treatment For Premature Ejaculation To Increase Sex DurationAyurvedic Treatment For Premature Ejaculation To Increase Sex Duration
Ayurvedic Treatment For Premature Ejaculation To Increase Sex DurationAyush Remedies
 
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21vinhbinh2010
 
Learning Deep Learning
Learning Deep LearningLearning Deep Learning
Learning Deep Learningsimaokasonse
 
Strategic Planning For Managers
Strategic Planning For Managers   Strategic Planning For Managers
Strategic Planning For Managers Yodhia Antariksa
 
New Product Development Strategy
New Product Development StrategyNew Product Development Strategy
New Product Development StrategyYodhia Antariksa
 

Andere mochten auch (16)

بطاقة وصف تسويق
بطاقة وصف تسويقبطاقة وصف تسويق
بطاقة وصف تسويق
 
Vitaminas Crescer Com SaúDe
Vitaminas   Crescer Com SaúDeVitaminas   Crescer Com SaúDe
Vitaminas Crescer Com SaúDe
 
강호동유재석
강호동유재석강호동유재석
강호동유재석
 
Projecto Jornalismo
Projecto JornalismoProjecto Jornalismo
Projecto Jornalismo
 
Derric social media-tactics-gmc
Derric social media-tactics-gmcDerric social media-tactics-gmc
Derric social media-tactics-gmc
 
market strategy
market strategymarket strategy
market strategy
 
الوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاءالوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاء
 
사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1
 
Benchmarking tqm
Benchmarking   tqmBenchmarking   tqm
Benchmarking tqm
 
Ayurvedic Treatment For Premature Ejaculation To Increase Sex Duration
Ayurvedic Treatment For Premature Ejaculation To Increase Sex DurationAyurvedic Treatment For Premature Ejaculation To Increase Sex Duration
Ayurvedic Treatment For Premature Ejaculation To Increase Sex Duration
 
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21
DECEMBER 2016 - Pictures of the month - Dec.̣16 - Dec.21
 
Learning Deep Learning
Learning Deep LearningLearning Deep Learning
Learning Deep Learning
 
Customer Equity
Customer EquityCustomer Equity
Customer Equity
 
Strategic Planning For Managers
Strategic Planning For Managers   Strategic Planning For Managers
Strategic Planning For Managers
 
تمرانست
تمرانستتمرانست
تمرانست
 
New Product Development Strategy
New Product Development StrategyNew Product Development Strategy
New Product Development Strategy
 

Ähnlich wie Oracle: Programs

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 03Thuan Nguyen
 
Oracle - Program with PL/SQL - Lession 01
Oracle - Program with PL/SQL - Lession 01Oracle - Program with PL/SQL - Lession 01
Oracle - Program with PL/SQL - Lession 01Thuan Nguyen
 
Les18[1]Interacting with the Oracle Server
Les18[1]Interacting with  the Oracle ServerLes18[1]Interacting with  the Oracle Server
Les18[1]Interacting with the Oracle Serversiavosh kaviani
 
Mysqlppt
MysqlpptMysqlppt
MysqlpptReka
 
e computer notes - Producing readable output with i sql plus
e computer notes - Producing readable output with i sql pluse computer notes - Producing readable output with i sql plus
e computer notes - Producing readable output with i sql plusecomputernotes
 
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Thuan Nguyen
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemHitesh Mohapatra
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with examplepranav kumar verma
 
Oracle - Program with PL/SQL - Lession 05
Oracle - Program with PL/SQL - Lession 05Oracle - Program with PL/SQL - Lession 05
Oracle - Program with PL/SQL - Lession 05Thuan Nguyen
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standardsAlessandro Baratella
 
Basic sqlstatements
Basic sqlstatementsBasic sqlstatements
Basic sqlstatementsAnjac
 
02 Writing Executable Statments
02 Writing Executable Statments02 Writing Executable Statments
02 Writing Executable Statmentsrehaniltifat
 
Function in PL/SQL
Function in PL/SQLFunction in PL/SQL
Function in PL/SQLPooja Dixit
 

Ähnlich wie Oracle: Programs (20)

Plsql
PlsqlPlsql
Plsql
 
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
 
Oracle - Program with PL/SQL - Lession 01
Oracle - Program with PL/SQL - Lession 01Oracle - Program with PL/SQL - Lession 01
Oracle - Program with PL/SQL - Lession 01
 
Les18[1]Interacting with the Oracle Server
Les18[1]Interacting with  the Oracle ServerLes18[1]Interacting with  the Oracle Server
Les18[1]Interacting with the Oracle Server
 
PL-SQL.pdf
PL-SQL.pdfPL-SQL.pdf
PL-SQL.pdf
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Select To Order By
Select  To  Order BySelect  To  Order By
Select To Order By
 
My SQL.pptx
My SQL.pptxMy SQL.pptx
My SQL.pptx
 
e computer notes - Producing readable output with i sql plus
e computer notes - Producing readable output with i sql pluse computer notes - Producing readable output with i sql plus
e computer notes - Producing readable output with i sql plus
 
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with example
 
Oracle : DML
Oracle : DMLOracle : DML
Oracle : DML
 
Oracle - Program with PL/SQL - Lession 05
Oracle - Program with PL/SQL - Lession 05Oracle - Program with PL/SQL - Lession 05
Oracle - Program with PL/SQL - Lession 05
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
 
Basic sqlstatements
Basic sqlstatementsBasic sqlstatements
Basic sqlstatements
 
02 Writing Executable Statments
02 Writing Executable Statments02 Writing Executable Statments
02 Writing Executable Statments
 
Oracle: Commands
Oracle: CommandsOracle: Commands
Oracle: Commands
 
8. sql
8. sql8. sql
8. sql
 
Function in PL/SQL
Function in PL/SQLFunction in PL/SQL
Function in PL/SQL
 

Mehr von oracle content

Mehr von oracle content (11)

Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
 
Oracle: PLSQL Introduction
Oracle: PLSQL IntroductionOracle: PLSQL Introduction
Oracle: PLSQL Introduction
 
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

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Kürzlich hochgeladen (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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 ...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Oracle: Programs

  • 1. 1 Using ORACLE® MANIPULATING DATA using PL/SQL
  • 2. 2 COMMENTING CODE We can add comments to the PL/SQL .There are two types of comments: EXAMPLE: DECLARE eage NUMBER ; --This is a single line comment . number variable defined. BEGIN SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’; /* A multiline command .Here the select command is defined */ END
  • 3. 3 FUNCTIONS The functions available in SQL can be used in PL/SQL code. Not all SQL function can be used in PL/SQL statements .The SQL functions unavailable in Pl/SQL statements are: DECODE function. All GROUP functions except the LEAST and GREATEST. EXAMPLE1: ename VARCHAR2(20) := INITCAP(‘bill’); --stores Bill in the variable ename. We can use data type conversion function in PL/SQL statements. EXAMPLE 2: mainphone NUMBER(10) := 9000000000; ename VARCHAR2(20); BEGIN SELECT name INTO ename FROM InfoTable WHERE phone = TO_NUMBER(mainphone); END
  • 4. 4 Operators in PL/SQL
  • 5. 5 Operators EXAMPLES: profit BOOL; sp NUMBER; cp NUMBER; BEGIN cp:= 1000; sp:= 1200; profit := ((sp – cp) > 100); -- finding if profit was above 100 or not END
  • 6. 6 RETRIEVING DATA We can retrieve data using the SELECT command. Variables are used to store the values returned from the SELECT statement and hence have to be of the same datatype and be declared before use. SYNTAX: SELECT column, […column] INTO variable_name,[…variable_name] FROM table_name WHERE { expression….}; EXAMPLE: DECLARE eage NUMBER; BEGIN SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’; DBMS_OUTPUT.PUT_LINE(‘ Age of bill is : ‘ || eage); END
  • 7. 7 INSERT command We can insert data into tables using the PL/SQL INSERT command. SYNTAX: INSERT INTO table_name (column , (…..column)) VALUES (value , (…..value)); EXAMPLE: BEGIN INSERT INTO InfoTable (name,age,phone) VALUES (‘micheal’,45,9666002203); END
  • 8. 8 UPDATE command We can update data in tables using the PL/SQL UPDATE comand. SYNTAX: UPDATE table_name SET column = value, (…column = value); WHERE {expression }; EXAMPLE: DECLARE eage NUMBER(5):=40; BEGIN UPDATE InfoTable SET age = eage WHERE name = ‘micheal’; END
  • 9. 9 DELETE command We can delete data from tables using the PL/SQL DELETE comand. SYNTAX: DELETE FROM table_name WHERE { expression }; EXAMPLE: BEGIN DELETE FROM InfoTable WHERE age = 45 ; END
  • 10. 10 MERGE COMMAND The MERGE comand is use to merge the data of one table into the data of another table.The merge command updates or inserts rows in order to make data in both rows similar. DECLARE ename INFOTABLE.NAME%TYPE := ‘bill'; BEGIN MERGE INTO addtable a USING infotable I Infotable ON (i.name =ename) WHEN MATCHED THEN UPDATE SET a.phone = i.phoneADDtable WHEN NOT MATCHED THEN INSERT VALUES(i.name,NULL,i.phone); END; ADDtable after MERGE
  • 11. THANK YOU 11 THANK YOU FOR VIEWING THIS PRESENTATION FOR MORE PRESENTATIONS AND VIDEOS ON ORACLE AND DATAMINING , please visit: www.dataminingtools.net