一:基本循环 LOOP 循环体: 退出循环: )IF condition THEN exit; END IF; ) exit WHEN condition; END LOOP; 二:WHILE循环 WHILE condition LOOP sequence_of_statements END LOOP; 三:FOR循环 正向FOR循环:从小值到大值迭代 FOR counter IN initial_value .. final_value LOOP sequence_of_statements;…
-- 1. 使用一个变量 declare -- Local variables here v_name ); begin -- Test statements here select t.user_name into v_name from pay_mer_order t ; dbms_output.put_line(v_name); end; -- 2. 使用多个变量 declare -- Local variables here v_name ); v_trans_no ); v_app_c…
select * from protype;select * from product;---笛卡尔连接查询(交叉连接)select * from protype,product;select * from protype cross join product;---标准写法---内链接查询select * from protype pt,product pd where pt.pt_id=pd.p_type;select * from protype pt inner join product…