SlideShare a Scribd company logo
1Using ORACLE®MANIPULATING DATA using PL/SQL
2COMMENTING CODEWe can add comments to the PL/SQL .There are two types of comments:EXAMPLE:	DECLAREeage 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
3FUNCTIONSThe 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);BEGINSELECT name INTO ename FROM InfoTable WHERE phone = TO_NUMBER(mainphone);END
4Operators in PL/SQL
5OperatorsEXAMPLES:profit BOOL;	sp NUMBER;	cp NUMBER;BEGINcp:= 1000;sp:= 1200;profit := ((sp – cp) > 100);      -- finding if profit was above 100 or notEND
6RETRIEVING 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_nameWHERE { expression….};EXAMPLE:DECLAREeage NUMBER;		BEGIN		SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’;	DBMS_OUTPUT.PUT_LINE(‘ Age of bill is : ‘ || eage);		END
7INSERT commandWe 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
8UPDATE commandWe can update data in tables using the PL/SQL UPDATE comand.SYNTAX:UPDATE table_nameSET 	column = value, 	(…column = value);WHERE	{expression };EXAMPLE:	DECLAREeage NUMBER(5):=40;		BEGIN		UPDATE InfoTable SET age = eage		WHERE name =  ‘micheal’;		END
9DELETE commandWe can delete data from tables using the PL/SQL DELETE comand.SYNTAX:DELETE  FROM table_nameWHERE  { expression };EXAMPLE:BEGIN		DELETE  FROM InfoTable		WHERE  age = 45 ;		END
10MERGE COMMANDThe 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.DECLAREename INFOTABLE.NAME%TYPE := ‘bill';BEGIN	MERGE INTO addtable a     	USING infotable I					Infotable     	ON (i.name =ename)				   	WHEN MATCHED THEN     	UPDATE SETa.phone = i.phoneADDtable   	WHEN NOT MATCHED THEN     	INSERT VALUES(i.name,NULL,i.phone);		END;ADDtable after MERGE
THANK YOU11THANK YOU FOR VIEWING THIS PRESENTATIONFOR MORE PRESENTATIONS AND VIDEOS ON ORACLE AND DATAMINING ,please visit:  www.dataminingtools.net
Ad

More Related Content

What's hot (18)

Les10
Les10Les10
Les10
arnold 7490
 
Les09
Les09Les09
Les09
arnold 7490
 
My sql Syntax
My sql SyntaxMy sql Syntax
My sql Syntax
Reka
 
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 Joins
Ashwin 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 |Thrissur
IndiaOptions Softwares
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
Mohd Tousif
 
Les12
Les12Les12
Les12
arnold 7490
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
Hema Prasanth
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
Belle Wx
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference Card
Techcanvass
 
Les14
Les14Les14
Les14
arnold 7490
 
Commands of DML in SQL
Commands of DML in SQLCommands of DML in SQL
Commands of DML in SQL
Ashish Gaurkhede
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
prathap kumar
 
Learn plsql
Learn plsqlLearn plsql
Learn plsql
Iulian Avram
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
Les02
Les02Les02
Les02
Sudharsan S
 
My sql Syntax
My sql SyntaxMy sql Syntax
My sql Syntax
Reka
 
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 Joins
Ashwin 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 |Thrissur
IndiaOptions 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 commands
Belle Wx
 
SQL Quick Reference Card
SQL Quick Reference CardSQL Quick Reference Card
SQL Quick Reference Card
Techcanvass
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 

Viewers also liked (16)

بطاقة وصف تسويق
بطاقة وصف تسويقبطاقة وصف تسويق
بطاقة وصف تسويق
Asma Al-khaldi
 
Vitaminas Crescer Com SaúDe
Vitaminas   Crescer Com SaúDeVitaminas   Crescer Com SaúDe
Vitaminas Crescer Com SaúDe
Medusa Fabula
 
강호동유재석
강호동유재석강호동유재석
강호동유재석
Webometrics Class
 
Projecto Jornalismo
Projecto JornalismoProjecto Jornalismo
Projecto Jornalismo
guestf8ccf75
 
Derric social media-tactics-gmc
Derric social media-tactics-gmcDerric social media-tactics-gmc
Derric social media-tactics-gmc
Vasil Azarov
 
market strategy
market strategymarket strategy
market strategy
Antony Mazumder
 
الوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاءالوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاء
ثامر عبدالله
 
사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1
Han Woo PARK
 
Benchmarking tqm
Benchmarking   tqmBenchmarking   tqm
Benchmarking tqm
Deborah Sharon
 
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
Ayush 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.21
vinhbinh2010
 
Learning Deep Learning
Learning Deep LearningLearning Deep Learning
Learning Deep Learning
simaokasonse
 
Customer Equity
Customer EquityCustomer Equity
Customer Equity
Yodhia Antariksa
 
Strategic Planning For Managers
Strategic Planning For Managers   Strategic Planning For Managers
Strategic Planning For Managers
Yodhia Antariksa
 
تمرانست
تمرانستتمرانست
تمرانست
Nour Elbader
 
New Product Development Strategy
New Product Development StrategyNew Product Development Strategy
New Product Development Strategy
Yodhia Antariksa
 
بطاقة وصف تسويق
بطاقة وصف تسويقبطاقة وصف تسويق
بطاقة وصف تسويق
Asma Al-khaldi
 
Vitaminas Crescer Com SaúDe
Vitaminas   Crescer Com SaúDeVitaminas   Crescer Com SaúDe
Vitaminas Crescer Com SaúDe
Medusa Fabula
 
Projecto Jornalismo
Projecto JornalismoProjecto Jornalismo
Projecto Jornalismo
guestf8ccf75
 
Derric social media-tactics-gmc
Derric social media-tactics-gmcDerric social media-tactics-gmc
Derric social media-tactics-gmc
Vasil Azarov
 
الوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاءالوصف الوظيفي لوظيفة خدمة العملاء
الوصف الوظيفي لوظيفة خدمة العملاء
ثامر عبدالله
 
사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1사이버컴과 네트워크분석 6주차 1
사이버컴과 네트워크분석 6주차 1
Han 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 Duration
Ayush 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.21
vinhbinh2010
 
Learning Deep Learning
Learning Deep LearningLearning Deep Learning
Learning Deep Learning
simaokasonse
 
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 Strategy
Yodhia Antariksa
 
Ad

Similar to Oracle: Programs (20)

Plsql
PlsqlPlsql
Plsql
Mandeep Singh
 
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
Thuan 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 01
Thuan 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 Server
siavosh kaviani
 
PL-SQL.pdf
PL-SQL.pdfPL-SQL.pdf
PL-SQL.pdf
Anas Nakash
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
Select To Order By
Select  To  Order BySelect  To  Order By
Select To Order By
Krizia Capacio
 
My SQL.pptx
My SQL.pptxMy SQL.pptx
My SQL.pptx
KieveBarreto1
 
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
ecomputernotes
 
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
Thuan Nguyen
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
Hitesh Mohapatra
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with example
pranav kumar verma
 
Oracle : DML
Oracle : DMLOracle : DML
Oracle : DML
oracle content
 
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
Thuan Nguyen
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
Alessandro Baratella
 
Basic sqlstatements
Basic sqlstatementsBasic sqlstatements
Basic sqlstatements
Anjac
 
02 Writing Executable Statments
02 Writing Executable Statments02 Writing Executable Statments
02 Writing Executable Statments
rehaniltifat
 
Oracle: Commands
Oracle: CommandsOracle: Commands
Oracle: Commands
oracle content
 
8. sql
8. sql8. sql
8. sql
khoahuy82
 
Function in PL/SQL
Function in PL/SQLFunction in PL/SQL
Function in PL/SQL
Pooja Dixit
 
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
Thuan 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 01
Thuan 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 Server
siavosh kaviani
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
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
ecomputernotes
 
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
Thuan Nguyen
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
Hitesh Mohapatra
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with example
pranav 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 05
Thuan Nguyen
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
Alessandro Baratella
 
Basic sqlstatements
Basic sqlstatementsBasic sqlstatements
Basic sqlstatements
Anjac
 
02 Writing Executable Statments
02 Writing Executable Statments02 Writing Executable Statments
02 Writing Executable Statments
rehaniltifat
 
Function in PL/SQL
Function in PL/SQLFunction in PL/SQL
Function in PL/SQL
Pooja Dixit
 
Ad

More from oracle content (11)

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

Recently uploaded (20)

Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 

Oracle: Programs

  • 2. 2COMMENTING CODEWe can add comments to the PL/SQL .There are two types of comments:EXAMPLE: DECLAREeage 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. 3FUNCTIONSThe 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);BEGINSELECT name INTO ename FROM InfoTable WHERE phone = TO_NUMBER(mainphone);END
  • 5. 5OperatorsEXAMPLES:profit BOOL; sp NUMBER; cp NUMBER;BEGINcp:= 1000;sp:= 1200;profit := ((sp – cp) > 100); -- finding if profit was above 100 or notEND
  • 6. 6RETRIEVING 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_nameWHERE { expression….};EXAMPLE:DECLAREeage NUMBER; BEGIN SELECT age INTO eage FROM InfoTable WHERE name = ‘bill’; DBMS_OUTPUT.PUT_LINE(‘ Age of bill is : ‘ || eage); END
  • 7. 7INSERT commandWe 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. 8UPDATE commandWe can update data in tables using the PL/SQL UPDATE comand.SYNTAX:UPDATE table_nameSET column = value, (…column = value);WHERE {expression };EXAMPLE: DECLAREeage NUMBER(5):=40; BEGIN UPDATE InfoTable SET age = eage WHERE name = ‘micheal’; END
  • 9. 9DELETE commandWe can delete data from tables using the PL/SQL DELETE comand.SYNTAX:DELETE FROM table_nameWHERE { expression };EXAMPLE:BEGIN DELETE FROM InfoTable WHERE age = 45 ; END
  • 10. 10MERGE COMMANDThe 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.DECLAREename INFOTABLE.NAME%TYPE := ‘bill';BEGIN MERGE INTO addtable a USING infotable I Infotable ON (i.name =ename) WHEN MATCHED THEN UPDATE SETa.phone = i.phoneADDtable WHEN NOT MATCHED THEN INSERT VALUES(i.name,NULL,i.phone); END;ADDtable after MERGE
  • 11. THANK YOU11THANK YOU FOR VIEWING THIS PRESENTATIONFOR MORE PRESENTATIONS AND VIDEOS ON ORACLE AND DATAMINING ,please visit: www.dataminingtools.net