![]() Please note that the &supplier_name value is enclosed in single quotes since the supplier_name field is defined as a varchar2 field. In our second example, we'll prompt the user for a supplier_name value. Where supplier_id = 1 Prompting for a text value SQLPlus has then returned records for the following SQL statement: select * from suppliers SQLPlus will then prompt as follows: Enter value for supplier_id: In this example, we've entered the following SQL statement: select * from suppliers In our first example, we'll prompt the user for a supplier_id value. ![]() ![]() ![]() ![]() We'll demonstrate how to prompt for both a numeric as well as a text value below: Prompting for a numeric value Question: In SQLPlus, I'd like to set up a SQL statement so that the user is prompted for a portion of the query condition.Īnswer: You can use the & character to prompt a user for a value. Oracle / PLSQL: Prompt user for a parameter value in SQLPlus ![]()
0 Comments
Leave a Reply. |