sp_medicinestockfindminsprice.sql
来自「一整套的源代码」· SQL 代码 · 共 23 行
SQL
23 行
create or replace function sp_medicinestockfindminsprice
(
l_medicinestockid in integer
)
return number
is
l_price number(16, 4);
l_medicineid integer;
l_packamount number(16, 4);
begin
l_price := sp_medicinestockfindprice(l_medicinestockid);
if l_price < 0 then
return -1;
end if;
select medicineid into l_medicineid from medicinestock where medicinestockid = l_medicinestockid;
select packamount into l_packamount from medicine where medicineid = l_medicineid;
return l_price / l_packamount;
exception
when others then
return -1;
end;
/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?