【oracle】存储过程04记录型变量

记录型变量
接受表中的一整行记录,相当于java中的一个对象
语法:变量名称  表名%ROWTYPE  ,例如:v_emp    emp%rowtype
===========================================================================================

-- Created on 2021/3/15 by 柴英兵 

declare 

  -- Local variables here

  v_row   student0%rowtype;

begin

  -- Test statements here 

     select    *    into  v_row  from  student0  where  id='1';

     DBMS_output.put_line('stundent0表中的一行记录:'||v_row.name);

end;

===========================================================================================







 

Guess you like

Origin blog.csdn.net/weixin_40074861/article/details/121830908
Recommended