DECLARE N_COUNT integer;
set N_COUNT = (select statement returning a single value)
Declaring a variable with integer datatype and setting a variable with a value.
select * from table1 fetch first (variable) rows only.
Now, I need to use the ncount variable in the select statement. I tried to use the variable but returned with an error. How will be able to achieve it?