Record datatype variables are composit data structure made up of different components called fields which have the same name and datatype as that of the columns of the table which is using in creating the record.
Example:
set serveroutput on;
declare
v_emp employees%rowtype;
begin
select * into v_emp from employees where employee_id=100;
dbms_output.put_line(v_emp.first_name||' '||v_emp.salary);
end;
/
REsult:
Steven 24000
In the above example v_emp is of employees row type..
No comments:
Post a Comment