利用存储函数,查询某个员工的年薪
生活随笔
收集整理的這篇文章主要介紹了
利用存储函数,查询某个员工的年薪
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
/*
利用存儲(chǔ)函數(shù),查詢某個(gè)員工的年薪
sal*12+ nvl(comm)
*/
create or replace function queryEmp(eno in number)
return NUMBER
as
? psal emp.sal% TYPE;
? pcomm emp.comm% TYPE;
begin
? select sal,comm into psal,pcomm from emp where empno=eno;
? --計(jì)算返回
? return psal*12 + nvl(pcomm,0);
end;
/
總結(jié)
以上是生活随笔為你收集整理的利用存储函数,查询某个员工的年薪的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 混合型基金持仓要求 注意股票的比例高低
- 下一篇: 打新和资金量有关系吗 天微电子中签