-1

Here is simple procedure for insert data into table is:-

create or replace 
PROCEDURE add_job_history
  (  p_emp_id          job_history.employee_id%type
   , p_start_date      job_history.start_date%type
   , p_end_date        job_history.end_date%type
   , p_job_id          job_history.job_id%type
   , p_department_id   job_history.department_id%type
   )
IS
BEGIN
  INSERT INTO job_history (employee_id, start_date, end_date,job_id, department_id)

    VALUES(p_emp_id, p_start_date, p_end_date, p_job_id, p_department_id);

END add_job_history;

Now i am Execute this stored procedure with parameter it will works...

but i want to make this procedure like everytime i am execute it & it shows me prompt and ask the value of colums.

Is this possible?

Like an example:-

exec add_job_history;
enter your employee_id:15
enter your start_date:

Help me out if possible.i am learning PL/SQL & confused with it.

Ravi
  • 28
  • 6
  • 1
    [Slightly related](https://stackoverflow.com/q/34789124/266304); and also [this](https://stackoverflow.com/q/33329972/266304). – Alex Poole Mar 07 '20 at 20:08

1 Answers1

1

No. Stored procedures run on the server and have no way of prompting the user for input. They have no idea what client application, if any, is being used to call the stored procedure.

You could write a SQL*Plus script that prompted the user for input and then called the stored procedure by passing in those values. That script would have to exist on every client machine.

Justin Cave
  • 227,342
  • 24
  • 367
  • 384