declare the variable as
v_count number;
e.g:
select max(emp_id)
into v_count
from employee;
now the variable v_count holds the value of the max(emp_id) and can be used.
----- Original Message -----
From: "Fotopoulos, Lefteris" <LFot@e...>
To: "sql language" <sql_language@p...>
Sent: Friday, July 27, 2001 7:28 AM
Subject: [sql_language] select max into a @variable
> How can i select max(column) into a stored_proc variable?
>
> e.g. set @var = select max(column) from table.
>
> So i want @var to hold the number that 'select max(column) from table'
> returns
>
>