📄 sp_pstockcheckout.sql
字号:
create or replace function sp_pstockcheckout
(
l_pstockmedicineid in integer,
l_amount in number
)
return integer
is
l_stockamount number(16, 4);
begin
select amount into l_stockamount from pstockmedicine where pstockmedicineid = l_pstockmedicineid;
if l_stockamount < l_amount then
return -1;
end if;
update pstockmedicine set amount = amount - l_amount where pstockmedicineid = l_pstockmedicineid;
return 0;
end;
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -