插入订单并且输出订单号的sql存储过程

--插入订单--
create proc InsertOrders
(
@OrderNumber varchar(300),
@OrderState varchar(30),
@OrderType varchar(30),
@OrderTime DateTime,
@OrderFirm varchar(300),
@OrderMoney decimal(8,2),
@SendWayMoney decimal(8,2),
@RegisterId int,
@CoalitionOrdersId int,
@ConsigneeId int,
@PayWayId int,
@SendWayId int,
@CouponId int,
@OrderId int output
)
AS
insert into Orders values(@OrderNumber,@OrderState,@OrderType,@OrderTime,@OrderFirm,@OrderMoney,@SendWayMoney,@RegisterId,@CoalitionOrdersId,@ConsigneeId,@PayWayId,@SendWayId,@CouponId)
set @OrderId = (select @@IDENTITY)
go

插入订单并且输出订单号的sql存储过程,布布扣,bubuko.com

插入订单并且输出订单号的sql存储过程

上一篇:MySql数据库并发和事务资料汇总


下一篇:SqlHelper