I want to mention that I'm new using sql developer and I'm trying to fill a temporary table with two values that are found in two variables, but i'm not able to get it right. I'm hoping that maybe one of you guys could have a better idea. This is what I've tried:
DECLARE
x NUMBER;
y NUMBER;
BEGIN
EXEC SELECT COUNT(*) INTO :x FROM (select * from view2 where restituita=1);
EXEC SELECT COUNT(*) INTO :y FROM (select * from view2 where restituita=0);
create global temporary table dateRest (rest number,nerest number);
insert into dateRest values(x,y);
select * from dateRest;
END;