Toad World® Forums

Oracle PL/SQL - Using Multiple Input Parameters ...


#1

Hi there,

I’m curious how I go about using multiple input parameters in Oracle PL/SQL.

For example, I would like to do something like this …

SELECT *
FROM EMPLOYEE
WHERE COUNTRY = ?
AND DEPARTMENT = ?
AND STATE = ?

Ultimately, I want the user prompted with custom prompt messages such as “Enter Country:”; “Enter Department:” ; “Enter State:”.

Any thoughts are welcomed!

Thanks and Regards,
Ben.


#2

Ben,

This is not a forum for PL/SQL questions. Briefly, PLSQL does not itself have a way to request values for variables. You can do this from within Toad or SQL*Plus with substitution variables, as in:

WHERE dept_id = &ID