---基本循环declarev1 number(2) :=1;begin loop dbms_output.put_line(v1); v1:=v1+1; exit when v1>10; --if v1>10 then exit; end if; end loop; end ; --while 循环 declarev1 number(2) :=1;begin while v1<10 loop dbms_output.put_line(v1); v1:=v1+1; end loop; e…
pl/sql 代码块: SELECT count(distinct t2.so_nbr) INTO v_count2 FROM KFGL_YW_STEP_qd t2 WHERE t2.partition_id_month=to_number(substr(p_month, 5, 2)) AND t2.area_id = cur_area.area_id AND t2.prod_id in (20201010,20201011,20202011,20203030); sql 直接运行 SELECT…
oracle 监控执行的sql语句 select * from v$sqlarea a where module='PL/SQL Developer' order by a.FIRST_LOAD_TIME desc select * from v$sqlarea a where module='PL/SQL Developer' order by a.FIRST_LOAD_TIME desc 监视oracle的执行sql情况: select q.sql_text from v$session s…