Search results
PL/SQL IF THEN ELSE statement. The IF THEN ELSE statement has the following structure: IF condition THEN statements; ELSE else_statements; END IF; Code language: PostgreSQL SQL dialect and PL/pgSQL (pgsql) If the condition evaluates to TRUE, then the statements between THEN and ELSE execute.
- PL/SQL CASE Statement
Summary: in this tutorial, you will learn how to use the...
- PL/SQL CASE Statement
This Oracle tutorial explains how to use the IF-THEN-ELSE statement in Oracle with syntax and examples. In Oracle, the IF-THEN-ELSE statement is used to execute code when a condition is TRUE, or execute different code if the condition evaluates to FALSE.
Learning plsql eBook (PDF) Download this eBook for free. Chapters. Chapter 1: Getting started with plsql. Chapter 2: Assignments model and language. Chapter 3: Bulk collect. Chapter 4: Collections and Records. Chapter 5: Cursors.
IF-THEN-ELSE It is an extension to IF-THEN statements. Allows specifying what to do if the condition evaluates to FALSE or NULL. Syntax: IF condition THEN action statements; ELSE action statements; END IF; Example: 2 This is an extension to Example 1.
This tutorial shows you how to use PL/SQL IF statements with three forms: IF-THEN, IF-THEN-ELSE and IF-THEN_ELSEIF statements.
A sequence of IF-THEN statements can be followed by an optional sequence of ELSE statements, which execute when the condition is FALSE. Syntax. Syntax for the IF-THEN-ELSE statement is −. IF condition THEN S1; ELSE S2; END IF; Where, S1 and S2 are different sequence of statements.
Example 4-2 IF THEN ELSE Statement. In this example, the statement between THEN and ELSE runs if and only if the value of sales is greater than quota+200; otherwise, the statement between ELSE and END IF runs.