SlideShare a Scribd company logo
1 of 3
Download to read offline
P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
Operators in PL/SQL
 Arithmetic Operators:
A number:=5; B number:=2;
Operator Usage Result
+ A+B 7
- A-B 3
* A*B 10
/ A/B 2.5
** (Raise to the power) A**B 25
 Relational Operators
A number:=5; B number:=2;
Operator Usage Result
= A=B false
!= or <> or ~= A!=B or A<>B or A~=B true
> A>B true
>= A>=B true
< A<B false
<= A<=B false
Note: You cannot use Relational operators in dbms_output.put_line() For example:
DECLARE
vA number:=5;
vB number:=2;
BEGIN
dbms_output.put_line(vA>=vB); - - Error
dbms_output.put_line(‘Result: ’||vA>=vB); - - Error
dbms_output.put_line(‘Result: ’||to_char(vA>=vB)); - - Error
END;
/
You can use relational operators in conditional statements like IF which we will cover in next part.
 Logical Operators- Logical operators work on Boolean operands and produces Boolean results.
A Boolean :=true; B Boolean :=false;
P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
Operator Usage Result
AND A AND B false
OR A OR B true
NOT NOT A false
 Comparison Operators: Comparison operators are used for comparing one expression to
another. The result is always either TRUE, FALSE OR NULL. So we cannot use in
dbms_output.put_line()
vA varchar2(50) :=’HELLO’;
LIKE
Usage Description Result
A LIKE ‘H%’ matches all string that starts with
H, i.e. H,HH,HHH,….HELLO,HELLO1
etc
true
A LIKE ‘K%’ matches all string that starts with
K
false
A LIKE ‘_ELLO’ matches all string having ‘ELLO’
excluding first character, i.e.
HELLO,KELLO,MELLO,DELLO,JELLO
etc.
true
% matches multiple characters while _ matches single character
BETWEEN
vX number :=10;
Usage Description Result
vX BETWEEN 10 AND 20 checks whether vX lies
between 10 to 20
true
vX BETWEEN 11 AND 20 checks whether vX lies
between 11 to 20
false
vX BETWEEN 10 AND 5 checks whether vX lies
between 10 to 5
false
IN
Usage Description Result
vX IN (10,20,30,50) checks whether vX is: 10 or 20
or 30 or 50
true
vX IN (40,50,30,20) checks whether vX 40 or 50 or
30 or 20
false

More Related Content

What's hot

Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)Ritika Sharma
 
A simple program C# program
A simple program C# programA simple program C# program
A simple program C# programMicheal Ogundero
 
C Programming Language Part 7
C Programming Language Part 7C Programming Language Part 7
C Programming Language Part 7Rumman Ansari
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c languagetanmaymodi4
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programmingprogramming9
 
function in c
function in cfunction in c
function in csubam3
 
1 introducing c language
1  introducing c language1  introducing c language
1 introducing c languageMomenMostafa
 
C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2Rumman Ansari
 
Functions in c
Functions in cFunctions in c
Functions in cInnovative
 
I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...hwbloom460000
 
Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Himanshu Kaushik
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projectsjwjablonski
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programmingRabin BK
 

What's hot (20)

Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)
 
A simple program C# program
A simple program C# programA simple program C# program
A simple program C# program
 
C Programming Language Part 7
C Programming Language Part 7C Programming Language Part 7
C Programming Language Part 7
 
Operators and expressions in c language
Operators and expressions in c languageOperators and expressions in c language
Operators and expressions in c language
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
PHP function
PHP functionPHP function
PHP function
 
function in c
function in cfunction in c
function in c
 
C programming
C programming C programming
C programming
 
1 introducing c language
1  introducing c language1  introducing c language
1 introducing c language
 
C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2C Programming Language Step by Step Part 2
C Programming Language Step by Step Part 2
 
Functions in c
Functions in cFunctions in c
Functions in c
 
I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...I am trying to figure out why my code won't work. It keeps telling me that my...
I am trying to figure out why my code won't work. It keeps telling me that my...
 
Activities on Operands
Activities on OperandsActivities on Operands
Activities on Operands
 
C++basics
C++basicsC++basics
C++basics
 
C++basics
C++basicsC++basics
C++basics
 
Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
 
C programming
C programmingC programming
C programming
 
PL/SQL Code for Sample Projects
PL/SQL Code for Sample ProjectsPL/SQL Code for Sample Projects
PL/SQL Code for Sample Projects
 
What is c
What is cWhat is c
What is c
 
Decision making statements in C programming
Decision making statements in C programmingDecision making statements in C programming
Decision making statements in C programming
 

Viewers also liked

Memoria capacitación inicial
Memoria capacitación inicialMemoria capacitación inicial
Memoria capacitación inicialCiudad Educativa
 
Nawal presentacion
Nawal presentacionNawal presentacion
Nawal presentacionnaawaaal
 
Identifica tu producto_con_porta_sistemas
Identifica tu producto_con_porta_sistemasIdentifica tu producto_con_porta_sistemas
Identifica tu producto_con_porta_sistemasPorta Sistemas
 
Html 1 SLIDES
Html 1 SLIDESHtml 1 SLIDES
Html 1 SLIDESagostont
 
Raomen2002 veur Braboos
Raomen2002   veur BraboosRaomen2002   veur Braboos
Raomen2002 veur BraboosMarc Heinen
 
тренінг дніпро
тренінг дніпротренінг дніпро
тренінг дніпроOlga Burda
 
aprende mas en nuestros programas
aprende mas en nuestros programas aprende mas en nuestros programas
aprende mas en nuestros programas Daniela Bustos
 
E com presentation part1 part2
E com presentation part1 part2E com presentation part1 part2
E com presentation part1 part2agostont
 
Scott D Holbrook Resume 04- 2015
Scott D Holbrook Resume 04- 2015Scott D Holbrook Resume 04- 2015
Scott D Holbrook Resume 04- 2015Scott Holbrook
 
Introduccion a la tecnología
Introduccion a la tecnologíaIntroduccion a la tecnología
Introduccion a la tecnologíaccamitissera
 
Madres de soacha daniela
Madres de soacha danielaMadres de soacha daniela
Madres de soacha danielaDanibracaglia
 
Cuanto cuesta el billete de metro en dubai
Cuanto cuesta el billete de metro en dubaiCuanto cuesta el billete de metro en dubai
Cuanto cuesta el billete de metro en dubaiLourdes Baca
 
Circular externa superservicios directriz en materia de gestion documental
Circular externa superservicios directriz en materia de gestion documentalCircular externa superservicios directriz en materia de gestion documental
Circular externa superservicios directriz en materia de gestion documentalSaginfo & Co
 

Viewers also liked (20)

Memoria capacitación inicial
Memoria capacitación inicialMemoria capacitación inicial
Memoria capacitación inicial
 
Reciclas
ReciclasReciclas
Reciclas
 
Nawal presentacion
Nawal presentacionNawal presentacion
Nawal presentacion
 
Sexojacque
SexojacqueSexojacque
Sexojacque
 
Identifica tu producto_con_porta_sistemas
Identifica tu producto_con_porta_sistemasIdentifica tu producto_con_porta_sistemas
Identifica tu producto_con_porta_sistemas
 
Html 1 SLIDES
Html 1 SLIDESHtml 1 SLIDES
Html 1 SLIDES
 
Deber
DeberDeber
Deber
 
Raomen2002 veur Braboos
Raomen2002   veur BraboosRaomen2002   veur Braboos
Raomen2002 veur Braboos
 
RESUME
RESUMERESUME
RESUME
 
тренінг дніпро
тренінг дніпротренінг дніпро
тренінг дніпро
 
aprende mas en nuestros programas
aprende mas en nuestros programas aprende mas en nuestros programas
aprende mas en nuestros programas
 
E com presentation part1 part2
E com presentation part1 part2E com presentation part1 part2
E com presentation part1 part2
 
Reportage
ReportageReportage
Reportage
 
Scott D Holbrook Resume 04- 2015
Scott D Holbrook Resume 04- 2015Scott D Holbrook Resume 04- 2015
Scott D Holbrook Resume 04- 2015
 
Introduccion a la tecnología
Introduccion a la tecnologíaIntroduccion a la tecnología
Introduccion a la tecnología
 
Madres de soacha daniela
Madres de soacha danielaMadres de soacha daniela
Madres de soacha daniela
 
Modulo 6
Modulo 6Modulo 6
Modulo 6
 
Cuanto cuesta el billete de metro en dubai
Cuanto cuesta el billete de metro en dubaiCuanto cuesta el billete de metro en dubai
Cuanto cuesta el billete de metro en dubai
 
Circular externa superservicios directriz en materia de gestion documental
Circular externa superservicios directriz en materia de gestion documentalCircular externa superservicios directriz en materia de gestion documental
Circular externa superservicios directriz en materia de gestion documental
 
Carnaval 2013
Carnaval 2013Carnaval 2013
Carnaval 2013
 

Similar to PL/SQL Part 3

Project in TLE
Project in TLEProject in TLE
Project in TLEPGT_13
 
Report Group 4 Constants and Variables
Report Group 4 Constants and VariablesReport Group 4 Constants and Variables
Report Group 4 Constants and VariablesGenard Briane Ancero
 
Report Group 4 Constants and Variables(TLE)
Report Group 4 Constants and Variables(TLE)Report Group 4 Constants and Variables(TLE)
Report Group 4 Constants and Variables(TLE)Genard Briane Ancero
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)jahanullah
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tourSwarup Boro
 
chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)It Academy
 
Operators
OperatorsOperators
OperatorsKamran
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++Neeru Mittal
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++sanya6900
 
answer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdanswer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdSyed Mustafa
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CSyed Mustafa
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++Praveen M Jigajinni
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7REHAN IJAZ
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxNithya K
 
Expressions and Operators.pptx
Expressions and Operators.pptxExpressions and Operators.pptx
Expressions and Operators.pptxJapneet9
 

Similar to PL/SQL Part 3 (20)

Project in TLE
Project in TLEProject in TLE
Project in TLE
 
Report Group 4 Constants and Variables
Report Group 4 Constants and VariablesReport Group 4 Constants and Variables
Report Group 4 Constants and Variables
 
Report Group 4 Constants and Variables(TLE)
Report Group 4 Constants and Variables(TLE)Report Group 4 Constants and Variables(TLE)
Report Group 4 Constants and Variables(TLE)
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tour
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
 
C++ revision tour
C++ revision tourC++ revision tour
C++ revision tour
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)chap 2 : Operators and Assignments (scjp/ocjp)
chap 2 : Operators and Assignments (scjp/ocjp)
 
Operators
OperatorsOperators
Operators
 
05 operators
05   operators05   operators
05 operators
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
operators and expressions in c++
 operators and expressions in c++ operators and expressions in c++
operators and expressions in c++
 
C++
C++ C++
C++
 
answer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcdanswer-model-qp-15-pcd13pcd
answer-model-qp-15-pcd13pcd
 
VTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in CVTU PCD Model Question Paper - Programming in C
VTU PCD Model Question Paper - Programming in C
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
Programming Fundamentals lecture 7
Programming Fundamentals lecture 7Programming Fundamentals lecture 7
Programming Fundamentals lecture 7
 
PROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptxPROGRAMMING IN C - Operators.pptx
PROGRAMMING IN C - Operators.pptx
 
Expressions and Operators.pptx
Expressions and Operators.pptxExpressions and Operators.pptx
Expressions and Operators.pptx
 

More from Gurpreet singh

Introduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP ReportingIntroduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP ReportingGurpreet singh
 
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...Gurpreet singh
 
Oracle Application Developmenr Framework
Oracle Application Developmenr FrameworkOracle Application Developmenr Framework
Oracle Application Developmenr FrameworkGurpreet singh
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuingGurpreet singh
 
Generics and collections in Java
Generics and collections in JavaGenerics and collections in Java
Generics and collections in JavaGurpreet singh
 
IO Streams, Serialization, de-serialization, autoboxing
IO Streams, Serialization, de-serialization, autoboxingIO Streams, Serialization, de-serialization, autoboxing
IO Streams, Serialization, de-serialization, autoboxingGurpreet singh
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle appsGurpreet singh
 
Defing locations in Oracle Apps
Defing locations in Oracle AppsDefing locations in Oracle Apps
Defing locations in Oracle AppsGurpreet singh
 
Assigning role AME_BUS_ANALYST
Assigning role AME_BUS_ANALYSTAssigning role AME_BUS_ANALYST
Assigning role AME_BUS_ANALYSTGurpreet singh
 
Introduction to Data Flow Diagram (DFD)
Introduction to Data Flow Diagram (DFD)Introduction to Data Flow Diagram (DFD)
Introduction to Data Flow Diagram (DFD)Gurpreet singh
 
Ingenium test(Exam Management System) Project Presentation (Full)
Ingenium test(Exam Management System) Project Presentation (Full)Ingenium test(Exam Management System) Project Presentation (Full)
Ingenium test(Exam Management System) Project Presentation (Full)Gurpreet singh
 
Computer Graphics Notes
Computer Graphics NotesComputer Graphics Notes
Computer Graphics NotesGurpreet singh
 

More from Gurpreet singh (20)

Introduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP ReportingIntroduction to Oracle Fusion BIP Reporting
Introduction to Oracle Fusion BIP Reporting
 
Why Messaging system?
Why Messaging system?Why Messaging system?
Why Messaging system?
 
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...Understanding Flex Fields with  Accounting Flexfields(Chart of Accounts) in O...
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...
 
Oracle Application Developmenr Framework
Oracle Application Developmenr FrameworkOracle Application Developmenr Framework
Oracle Application Developmenr Framework
 
Java Servlet part 3
Java Servlet part 3Java Servlet part 3
Java Servlet part 3
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuing
 
Oracle SQL Part 3
Oracle SQL Part 3Oracle SQL Part 3
Oracle SQL Part 3
 
Oracle SQL Part 2
Oracle SQL Part 2Oracle SQL Part 2
Oracle SQL Part 2
 
Oracle SQL Part1
Oracle SQL Part1Oracle SQL Part1
Oracle SQL Part1
 
Generics and collections in Java
Generics and collections in JavaGenerics and collections in Java
Generics and collections in Java
 
IO Streams, Serialization, de-serialization, autoboxing
IO Streams, Serialization, de-serialization, autoboxingIO Streams, Serialization, de-serialization, autoboxing
IO Streams, Serialization, de-serialization, autoboxing
 
Java Servlets Part 2
Java Servlets Part 2Java Servlets Part 2
Java Servlets Part 2
 
Creating business group in oracle apps
Creating business group in oracle appsCreating business group in oracle apps
Creating business group in oracle apps
 
Defing locations in Oracle Apps
Defing locations in Oracle AppsDefing locations in Oracle Apps
Defing locations in Oracle Apps
 
Assigning role AME_BUS_ANALYST
Assigning role AME_BUS_ANALYSTAssigning role AME_BUS_ANALYST
Assigning role AME_BUS_ANALYST
 
PL/SQL Part 1
PL/SQL Part 1PL/SQL Part 1
PL/SQL Part 1
 
Introduction to Data Flow Diagram (DFD)
Introduction to Data Flow Diagram (DFD)Introduction to Data Flow Diagram (DFD)
Introduction to Data Flow Diagram (DFD)
 
Ingenium test(Exam Management System) Project Presentation (Full)
Ingenium test(Exam Management System) Project Presentation (Full)Ingenium test(Exam Management System) Project Presentation (Full)
Ingenium test(Exam Management System) Project Presentation (Full)
 
Computer Graphics Notes
Computer Graphics NotesComputer Graphics Notes
Computer Graphics Notes
 
Learn Java Part 11
Learn Java Part 11Learn Java Part 11
Learn Java Part 11
 

Recently uploaded

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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
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
 

Recently uploaded (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
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
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
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
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
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
 

PL/SQL Part 3

  • 1. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h Visit: http://gsbprogramming.blogspot.in
  • 2. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h Visit: http://gsbprogramming.blogspot.in Operators in PL/SQL  Arithmetic Operators: A number:=5; B number:=2; Operator Usage Result + A+B 7 - A-B 3 * A*B 10 / A/B 2.5 ** (Raise to the power) A**B 25  Relational Operators A number:=5; B number:=2; Operator Usage Result = A=B false != or <> or ~= A!=B or A<>B or A~=B true > A>B true >= A>=B true < A<B false <= A<=B false Note: You cannot use Relational operators in dbms_output.put_line() For example: DECLARE vA number:=5; vB number:=2; BEGIN dbms_output.put_line(vA>=vB); - - Error dbms_output.put_line(‘Result: ’||vA>=vB); - - Error dbms_output.put_line(‘Result: ’||to_char(vA>=vB)); - - Error END; / You can use relational operators in conditional statements like IF which we will cover in next part.  Logical Operators- Logical operators work on Boolean operands and produces Boolean results. A Boolean :=true; B Boolean :=false;
  • 3. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h Visit: http://gsbprogramming.blogspot.in Operator Usage Result AND A AND B false OR A OR B true NOT NOT A false  Comparison Operators: Comparison operators are used for comparing one expression to another. The result is always either TRUE, FALSE OR NULL. So we cannot use in dbms_output.put_line() vA varchar2(50) :=’HELLO’; LIKE Usage Description Result A LIKE ‘H%’ matches all string that starts with H, i.e. H,HH,HHH,….HELLO,HELLO1 etc true A LIKE ‘K%’ matches all string that starts with K false A LIKE ‘_ELLO’ matches all string having ‘ELLO’ excluding first character, i.e. HELLO,KELLO,MELLO,DELLO,JELLO etc. true % matches multiple characters while _ matches single character BETWEEN vX number :=10; Usage Description Result vX BETWEEN 10 AND 20 checks whether vX lies between 10 to 20 true vX BETWEEN 11 AND 20 checks whether vX lies between 11 to 20 false vX BETWEEN 10 AND 5 checks whether vX lies between 10 to 5 false IN Usage Description Result vX IN (10,20,30,50) checks whether vX is: 10 or 20 or 30 or 50 true vX IN (40,50,30,20) checks whether vX 40 or 50 or 30 or 20 false