1. 个人技术分享首页

实用的银行转账存储过程和流水号生成存储过程

银行转账存储过程

USE [BankInfor]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Transfer](@inAccount int,@outAccount int,@amount float)
as declare
  @totalDeposit float;
  begin
  select @totalDeposit=total from Account where AccountNum=@outAccount;
  if @totalDeposit is null
  begin
  rollback;
  print'转出账户不存在或账户中没有存款'
  return;
  end
  if @totalDeposit

文章来源于互联网:实用的银行转账存储过程和流水号生成存储过程

原创文章,作者:admin,如若转载,请注明出处:https://www.aliyunsolution.com/3630.html