Loading topic
IF-THEN statement. It assumes you can write an anonymous block (DECLARE, BEGIN, EXCEPTION, END), declare and assign scalar variables, and run a script with DBMS_OUTPUT enabled. Examples that query tables use the Oracle HR 5 min readIF ... THEN ... END IF statement and run an anonymous block with DBMS_OUTPUT enabled. It also assumes you know that a condition evaluates to TRUE, FALSE, or NULL. Here you will learn how ELSE and ELSIF extend a single decision into a choice between 5 min readDBMS_OUTPUT enabled. By the end you should be able to write a simple CASE statement and predict which branch runs. You should5 min readDBMS_OUTPUT enabled and that you know how IF-ELSIF-ELSE works. It also assumes you know that a condition can evaluate to TRUE, FALSE, or NULL. The previous chapter covered the simple CASE statement, which compares one selector value a5 min readCASE_NOT_FOUND. Here you will learn the second axis along w5 min readSET SERVEROUTPUT ON in SQL*Plus or SQLcl, or with DBMS_OUTPUT enabled in 5 min readDBMS_OUTPUT enabled. It also assumes you know that a condition in PL/SQL can be TRUE, FALSE, or NULL, which the first chapter of this tutorial covers. The basic LOOP is the si5 min readDBMS_OUTPUT enabled. It also assumes you know the basic LOOP with EXIT WHEN and that a condition in PL/SQL can be TRUE, FALSE, or NULL.5 min readEXIT WHEN in a basic LOOP. It covers the numeric FOR loop: its syntax, the rules for its counter and bounds, and the mistakes people make with it.5 min readDBMS_OUTPUT enabled. Here you will learn to skip the rest of one iteration with CONTINUE, and to name loops with labels so that EXIT and CONTINUE can target an oute5 min readSELECT ... WHERE query, and have read the earlier chapters on the numeric FOR loop, EXIT, and CONTINUE. Examples use the Oracle HR sample schema and need SET SERVEROUTPUT ON in SQL*Plus or SQLcl.5 min read