151030
create or replace procedure pr_mytest is v_test number(8):= 123; v_char varchar2(10) := '数据库'; c_changl constant number(12,2) := 3.14; v_bm t_hq_ryxx.bum%type; type ty_ry is record --定义一种新的记录类型 ( v_xingm t_hq_ryxx.xingm%type, v_xingb t_hq_ryxx.xingb%type, v_gongz number(10,2) ); v_ry ty_ry;--声明这种记录类型的变量 v_ryrow t_hq_ryxx%rowtype;--表的所有字段 begin v_char := '狗蛋'; select xingm,xingb,gongz into v_ry from t_hq_ryxx where rownum = 1; dbms_output.put_line('蛋疼类型='||v_ry.v_xingm||' '||v_ry.v_xingb||' '||v_ry.v_gongz); select*into v_ryrow from t_hq_ryxx where rownum = 1; dbms_output.put_line('是在蛋疼='||v_ryrow.xingm||''||v_ryrow.nianl||''||v_ryrow.xingb); select bum into v_bm from t_hq_ryxx where rownum = 1; dbms_output.put_line(v_char ||',测持存储过程,记录='|| v_bm); end pr_mytest;