How to assign a column value to variable in PL-SQL-Procedure?
I want to retrieve a value from a table and assign it to a variable inside a PL-SQL procedure.
This variable should later be used in WHERE clauses or comparison statements.
It should look like similar to:
myvar NUMBER;
myvar := SELECT myid FROM mytab WHERE ....:
if myvar > 23 THEN .... END-IF;
The code above does however not work. How do I otherwise assign
a column value to a procedure variable?
How do I catch the error that the SELECT statement returns MORE than one value?
Peter