您的位置:首页 > 其它

声明一个记录类型,定义记录类型变量,保存员工信息

2015-10-03 22:22 429 查看
declare

Type t_emp is record(deptno employees.departmentid%type,

fname employees.firstname%type,

sal employees.salary%type);

v_emp t_emp;

begin

select departmentid, firstname, salary

into v_emp

from employees

where employeeid = 109;

dbms_output.put_line(v_emp.deptno || ' ' || v_emp.fname || ' ' ||

v_emp.sal);

end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: