Database Values
You can use the SELECT statement to have the Oracle assign values to a variable. For
Each and every item in the select list, there must be a matching, type-compatible variable in the INTO list. An illustration is as shown below:
DECLARE
my_empno emp.empno%TYPE;
my_ename emp.ename%TYPE;
wages NUMBER(7,2);
BEGIN
...
SELECT ename, sal + comm
INTO last_name, wages FROM emp
WHERE empno = emp_id;
Though, you cannot select column values into the Boolean variable.