I want to create the Procedure menu that will read the parameter from the keybord interactively and perform some actions not leaving the menu.
Something like this:
CREATE OR REPLACE PROCEDURE menu AS
=> reading the value from keybord
IF value = 'A' THEN
=> call some function
ELSEIF value = 'B' THEN
=> call another function
ELSEIF value = 'C' THEN
In SQL*Plus we can use ACCEPT and then call the stored procedure passing the "value" as parameter, but when the procedure is done the script is finished. I can't find any way to create loop-like script that will repeat reading of the value.
It is possible to have the loop in PL/SQL but what about the interactive reading of the value?. I looked through several PL/SQL books and didn't find any example.