How do I apply IN parameter as my_email and OUT as my_salary in this procedure:
CREATE OR REPLACE PROCEDURE FYI_CENTER AS
my_email employees.email%TYPE; -- **IN Parameter**
my_salary employees.salary%TYPE; -- **OUT Parameter**
BEGIN
SELECT email, salary INTO my_email, my_salary
FROM employees WHERE employee_id = 101;
DBMS_OUTPUT.PUT_LINE('My email = ' || my_email);
DBMS_OUTPUT.PUT_LINE('My salary = ' || my_salary);
END;
You can’t return a value into an IN parameter. What I suspect you want is a general purpose procedure like this:
… which you can then call like this: