Usage of Variable in the sql Prompt Usage of Variable in the sql Prompt motto (Programmer) (OP) 18 Jul 00 06:54 Hi, How to declare a variable in theSQL>Prompt and use the same in any PL/SQLBlock.Hope got my question.Thanks in advanceMotto RE: Usage of Variable in the sql Prompt Mappy (Programmer) 19 Jul 00 18:16 If you mean from within SQL*Plus:'SET DEFINE ON' and then prefix your variable names with '&', eg. SELECT column1 FROM table WHERE column2 = '&my_variable'SQL*Plus will prompt you for the value every time it runs.If you use '&&' as a prefix the variable will be kept for theremainder of the SQL*Plus session.I hope this answers your question. RE: Usage of Variable in the sql Prompt yaffle (MIS) 25 Jul 00 09:31 The use of & or && as variable markers may not be what you want here. These will simply perform text substitution within a SQL*Plus script. If you want to reference your value from within a PL/SQL stored procedure for example, you'll need to declare a bind variable.To declare a PL/SQL variable in SQL*Plus, use the variable command, then reference it using a colon, e.g.SQL> variable a number;SQL> execute :a := 2;PL/SQL procedure successfully completedSQL> print a A--------- 2SQL> select :a * 4 from sys.dual; :A*4--------- 8SQL>I hope this helps.