oracle函数,返回数据表类型,我的这个函数对吗
createorreplacefunctionget_emp(namevarchar2)RETURNtableisdeclarecreatetableemp(enonum...
create or replace function get_emp(name varchar2) RETURN table is
declare
create table emp(
eno number,
ename varchar2,
email varchar2,
etel number,
eday number,
dno number,
dname varchar2);
begin
select eno, ename, email,etel, eday, dno, dname into emp.eno,emp.ename,
emp.email,emp.etel,emp.eday,emp.dno,emp.dname
from e_d
where dname= name;
return emp;
end; 展开
declare
create table emp(
eno number,
ename varchar2,
email varchar2,
etel number,
eday number,
dno number,
dname varchar2);
begin
select eno, ename, email,etel, eday, dno, dname into emp.eno,emp.ename,
emp.email,emp.etel,emp.eday,emp.dno,emp.dname
from e_d
where dname= name;
return emp;
end; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询