deposit_x.sql
来自「用dephi写的一个银行管理系统」· SQL 代码 · 共 35 行
SQL
35 行
create procedure Deposit_t_x
@type varchar(50),
@Number char(15),
@money1 float(8),
@date datetime,
@id char(6),
@riqi integer
as
begin transaction
update customer
set trust_abi=trust_abi-1
where customer_id=@id and @riqi>100 and trust_abi>=0
if @@Error<>0 goto PRO
update overdraft
set amount=amount-@money1
where card_type=@type and card_no=@Number
if @@Error<>0 goto PRO
update fund_bill
set fortune_amount=0.0,deposit_date=@date
where card_type=@type and card_no=@Number
if @@Error<>0 goto PRO
commit transaction
return 0
PRO:
Rollback Transaction
return 1
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?