Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.
create or replace procedure test() --create a temp table to hold my final results create global temporary table final_results( id varchar2(8), id_num number, comment varchar2(100), comment2 varchar2 (10), total_num number); -- insert some stuff into the final results insert into final_results(id,id_num,comment,comment2) with Letter as ( blah.blah blah..), ... I do a bunch of stuff inbetween and it works fine ... then end my with with a select select id,id_num,comment,comment2 from all; --declare a variable to store a value DECLARE a NUMBER; BEGIN SELECT count(employee_id) INTO a FROM employee; update final_results set total_num = a; END; -- get my results from the final_results table select * from final_results -- drop my temp table drop table final_resul;ts;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Not listening to where||1||43|
|T-SQL: How to extract records into a new table||7||44|
|how to use l_instance in the host command||7||36|
|SQL - Update field value based on two other fields in same table.||13||43|
Join the community of 500,000 technology professionals and ask your questions.