EXIT statement in Oracle PLSQL is most commonly used to end the LOOP statement’s execution. The Syntax for the EXIT Statement in Oracle PLSQL is: EXIT [WHEN boolean_condition]; Example of an EXIT Statement in Oracle PLSQL is: The above loop will execute the “sum := sum+1; statement 35 times. The loop will start counting from […]
statement
GOTO Statement in Oracle PLSQL
A GOTO Statement in Oracle PLSQL is used to redirect the code execution to a “Label” as specified in the GOTO statement. Syntax of the GOTO Statement in Oracle PLSQL is: GOTO label_name; Somewhere further in the code, we need to place the label “label_name” and provide the code to be executed. Example of GOTO […]
CASE Statement in Oracle SQL PLSQL
A CASE Statement in Oracle SQL / PLSQL is having the functionality of IF-THEN-ELSE Statement. Syntax of the CASE Statement in Oracle SQL / PLSQL is: CASE [expression] WHEN condition_1 THEN result_1 WHEN consition_2 THEN result_2 WHEN condition_3 THEN result_3 . . WHEN condition_N THEN result_N ELSE default_result END; expression is an optional value, if […]
IF THEN ELSE Statement in Oracle PLSQL
An IF-THEN-ELSE Statement in Oracle PLSQL is basically a conditional statement that evaluates an expression, if the expression evaluates to true, then the ‘THEN’ portion of the code is executed, if the expression evaluates to false, then ‘ELSE’ part of the code gets executed. There are 3 syntaxes of IF-THEN-ELSE Statement in Oracle PLSQL: Syntax […]
Change User Password in SQL – PLSQL
In Oracle SQL / PLSQL a user’s password can be changed using ALTER command. Syntax for changing the user password using ALTER command in Oracle SQL / PLSQL is: ALTER USER user_name IDENTIFIED BY new_password; Example: Here we have changed the password for “techhoney” user as “pwdhoney”.