Oracle:在函数中返回多个值

Oracle:在函数中返回多个值,第1张

Oracle:在函数中返回多个值

上面的函数编译没有任何错误?是什么类型的

MV_EMP
?理想情况下,它应该像下面这样。

create or replace type emp_type(first_name varchar2(20), last_name varchar2(20), depart_name varchar2(20))/create or replace function get_employee (loc in number)return emp_typeas     emp_record emp_type;begin   select a.first_name, a.last_name, b.department_name into emp_record    from employees a, departments b    where a.department_id=b.department_id and location_id=loc;   return(emp_record);  end;


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5675436.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存